Sage Vishwamitra performed intense austerities to become a great sage. Indra, the king of Devas, wanted to test the qualities of the Vishwamitra, who before becoming a saint was a king. The story explains the importance and greatness of Gayatri Mantra.
Vishwamitra was born in the Kushik Dynasty. King Vishwamitra once visited the Ashram of Sage Vasishta and came to know about the holy cow Nandini in the Ashram, which had wish fulfilling power.
King Vishwamitra felt that the cow would be more use to a king. So he asked for the cow. But Sage Vasishta said that Nandini would only leave the ashram only if she likes.
Nandini was not ready to leave. Vishwamitra and soldiers tried to take the cow away forcibly but were defeated by the powers of Nandini. An insulted Vishwamitra soon realized that spiritual powers were more powerful than a king’s commands and arrows.
Vishwamitra then abdicated his throne and took to the life of a Sanyasi. He performed intense meditations and became a powerful Rishi.
Indra was not convinced that a king can become a great saint.
So to test Vishwamitra, Indra came in disguise and asked the Sage to serve him food.
Vishwamitra happily agreed to serve food.
Indra said he wanted the food kept hot, while he was out having his bath. But Indra had no intention of coming back.
Indra stayed away thinking that it would be impossible for Vishwamitra to keep the food hot. But Vishwamitra was able to keep the food hot. Indra stayed away for years but the food was still hot as if freshly prepared.
Sage Vishwamitra knew the power of the Gayatri mantra. So he put the pot of food on is head and recited the mantra repeatedly.
That was enough to keep it hot. Indra then came to the sage and acknowledged that Vishwamitra was indeed a great sage.