Updated: Dec 9, 2022
Grutasmad, the son of Indra and a rishi’s wife, was cursed by his mother to bear a rakshas as a son.
He thus once sneezed and out came a lad named Tripurasura. Grutasmad took care of the lad as his own and also taught him the Ganesha mantra. Now thanks to a boon by Ganesha himself, the lad was to be undefeatable except for Shiva.
With this knowledge in hand, Tripurasura felt invincible and began troubling everyone around him. He also defeated Indra, the king of gods, and took over his abode as well. Extremely scared by the turn of events, the devas approached Narada for advice.
Narada told them to pray to Shiva since as per the boon it was only him who could defeat Tripurasura. Shiva agreed to help the devas and battled the asura but was unable to defeat him. He then realized that he had forgotten to invoke Ganesha by reciting the Ganesha mantra before the battle. He thus recited it at once and was able to slay the asura quite easily.
The place where Shiva invoked Ganesha and defeated Tripurasura was Ranjangaon.