Once, the king imported some horses from Persia and gave them to his cavalry men to train along with enough money for their upkeep.
Tenali also asked the king for one horse and was granted. He created a barn that was closed on all sides and made a little hole from which he passed hay once in a day. So whenever he did so, the hungry horse leapt on it.
Once, the king wanted to inspect all horses and found that Tenali and his horse were missing. On inquiring Tenali said that his horse had become stubborn and would come only if a learned and holy man like Subba Shastri brought him.
Subba agreed and went for the task. When he peeped through the hole meant for fodder, the hungry horse leapt on his beard mistaking his beard to be hay and held on to it. It was when Subba pleaded for help when Tenali got the walls broken down and took both to the court.
Seeing them the entire court laughed and Subba got the lesson of being nice to Tenali that he had not been in the past.