Ravana, the great asura lord of Lanka and a devotee of Siva, is asked by his mother to bring her the sacred "Atmalinga" from Kailash so that she may pray to it daily. Ravana does extreme penance to Siva in order to obtain it. The demigod Indra is scared that the asura king will obtain supreme power along with the Atmalinga and he asks the itinerant sage Narada to ruin Ravana's plan. Ravana is tricked into asking for Siva's consort the goddess Parvati. In the meantime, Mandodari the beautiful princess of the underworld falls in love with Ravana and woos him. When Ravana realises the trick played upon him and the great sin he had committed in lusting after the mother-goddess Parvati, he does penance again and cuts off his own head in repentance. Pleased, Lord Siva expiates his sin and grants him the Atmalinga. Ravana also gets to marry his true love Mandodari and all seems well. But there is a fiat that the Atmalinga should never rest on the earth until it reaches Lanka or else it will take root and become immovable. As Ravana journeys to the south along with Mandodari and the Atmalinga, he is again tricked by Ganesha under Narada's direction into letting it rest on the sea shore at Gokarna. It takes root all the way into the underworld, and this site becomes the famous Mahabaleswara Temple.