Once upon a time, Lord Brahma invoked a beautiful lady named Ahilya. Lord Indra and other minor gods thought that Lord Brahma would hand her over to them but instead he gave this responsibility to Gautam Rishi.
After a few years, Lord Brahma returned to the hermitage of Gautam Rishi only to find Ahilya hale and hearty. He became so happy that he married her to the rishi.
Later one day, Lord Indra transformed himself to Gautam rishi and while in the absence of the rishi, went inside his cottage. Poor Ahilya couldn’t recognise him as he looked identical to her husband. Thus Indra took advantage and made love with her.
Gautam rishi caught them red hand. He cursed Lord Indra to become impotent and transformed Ahilya into a rock of stone. He further added that she would regain her original form only when Lord Ram would touch her with his feet.
Centuries passed by and one day Rishi Vishwamitra brought Lord Ram to the hermitage. As soon as he touched the rock of stone with his feet, Ahilya regained her original form. She was extremely delighted to see Lord Ram and bowed down before him in reverence. She expressed her gratitude to Gautam rishi because had he not cursed her, she would have never been able to see Lord Ram with her naked eyes.
After being blessed by him, she finally went to heaven.