Once Sage Vishwamitra had approached King Dasaratha for help. Some demons had been troubling the sages and were not allowing them to carry out their Yajnas in peace. King Dasaratha agreed and sent Rama and Laxmana with Sage Vishwamitra to Mithila to fight with the demons and help the sages.
One day, while accompanying Sage Vishwamitra to Janakpur for Sita's swayamvar, Rama and Laxmana came upon a deserted hut. They wondered whom the hut belonged. The hut belonged to the sage, Gautama, and his wife, Ahilya.
Ahilya was a very pious woman but when she had seen Indra the first time, she had developed a liking for him. Gautama came to know of her feelings for Indra and in a fit of rage, he cursed Indra to lead the life of a eunuch while Ahilya was cursed to turn into a stone.
Vishwamitra knew that Rama could relieve Ahilya of the curse and begged Rama to do so. As Rama entered the ashram his feet touched the stone and it was transformed into a beautiful lady. Ahilya had come back to her own form. In a moment, the ashram too came alive with colourful flowers, green trees, and the twittering of birds.
Ahilya thanked Rama and Laxmana and offered them her warm hospitality. Meanwhile, Gautama also forgave Ahilya and returned to live with her in the ashram. He then blessed the two brothers and thanked Sage Vishwamitra for his intervention.