The story of Ahalya, wife of Gautama Rishi, is an important episode in the epic Ramayana. Ahalya story happens during the exile period of Sri Ram and is found in the Bala Kanda. Bhagavan Sri Ram touches a stone near the Ashram of Gautama Rishi and it suddenly turns into a woman. This was Ahalya who was cursed by her husband to become a stone.
Indra, the king of demigods, was infatuated by the beauty of Ahalya. He attempted to seduce her by taking the form of Gautama Rishi. Ahalya did not stop the advances of Indra, although Ahalya knew that it was not her husband who was approaching her.
When Gautama Rishi, who had gone for his morning bath, suddenly returned and Indra took the form of a cat and escaped from the ashram. The rishi, however, knew through his yogic powers what had occurred. He cursed his wife, turning her to stone, and put a curse on Indra as well.
It is said that Indra was cursed to roam around with 1000 vaginas on his body. Later Indra did penance and turned the vaginas into eyes. Another Purana states that Indira was cursed that he will lose his testicles. Devas is said to have replaced it with that of a male sheep.
Ahalya who was cursed by her husband to become a stone attained Moksha when Bhagvan Sri Ram touched her with his foot.