After a few days, Sage Vishwamitra got an invitation to the Swayamvara of Seeta. He took both the princes to Mithila. On the way, they came to a beautiful but deserted ashrama. Rama wanted to know the reason behind it.
Sage Vishwamitra told Rama that long ago, Sage Gautama used to live there with his beautiful and chaste wife Ahalya. One day, Indra, the king of gods, being infatuated with Ahalya’s beauty, came to the ashrama when Sage Gautama had gone out. He assumed Gautama’s form and went to Ahalya, who thinking him to be her husband Gautama, behaved very lovingly towards him. Gautama saw Indra returning, and realising what had happened, he cursed him. Then, he cursed Ahalya to turn into a rock. She would be redeemed only when the feet of some royal person touched the ashrama. Saying these words, Sage Gautama proceeded to the Himalayas for penance.
Hearing the story of Ahalya, Rama was moved with pity. He redeemed Ahalya after nullifying the curse inflicted upon her. Ahalya bowed to Rama and headed for the Himalayas to be with her husband. Sage Vishwamitra with Rama and Lakshmana moved ahead.