Rumors spread throughout the empire about a ghost that did evil things. The people were terrified, though no one had actually seen the ghost. The emperor's announcement of a substantial reward for the person who captured the ghost met with no success.
One day, a sannyasi wearing saffron robes and a long beard arrived at the palace and told the emperor he would solve the problem of the ghost in exchange for a reward. The emperor gladly agreed. The sannyasi chanted some mantras and left after assuring the emperor that the ghost would no longer cause any trouble. The emperor announced to his citizens that a sannyasi had banished the ghost from the empire.
Two days later, the sannyasi returned. Those two days had passed uneventfully; there had been no reports of the ghost and peace had prevailed. The sannyasi demanded a thousand gold coins from the emperor, who paid him immediately. The sannyasi then proceeded to take off his saffron robes and beard, which was fake. He was none other than Tenali Rama!
Rama bowed to the emperor and said, "There is no such thing as a ghost; it was a mere delusion of the people."
The emperor was so pleased that he let Rama keep the gold coins.