Both the town of Nanjangud and the Nanjundeshwara Temple probably derive their names from Nanjayya, the name of a native folk deity who later became identified as Shiva. According to a popular local legend, the Devas (gods) appealed to Shiva for protection from an Asura (demon) called Kesian that was terrorizing them. Shiva advised them invite the demon to a yagna (ritual sacrifice) at the confluence of the Kapila, Koundina, and Markina rivers near to where the Nanjundeshwara Temple now stands and throw him into the fire pit when he arrived at the ceremony.
After pretending to welcome the hapless demon, the Devas tossed Kesian into the flames and then Shiva appeared in the form of Agni, the god of fire, and destroyed him, figuratively drinking in the poison (nanju) that was embedded in the demon. Shiva thus became known as Nanjundeshwara and is worshiped in this form in the eponymous temple. As a result of this incident, the deity was believed to have assumed great healing powers as well and attracts thousands of devotees who come in search of a cure for the diseases they are suffering from.
Probably because it is based on a similar theme, the temple also celebrates a much more famous episode from Hindu mythology in which Vishnu persuaded the gods and demons to churn Amrita (the nectar of immortality) from the celestial ocean of milk. After the ocean had disgorged a cornucopia of wondrous gifts that were immediately snapped up by the assembled gods and demons, it started spewing out vast quantities of poison. Naturally, none of them wanted anything to do with this, so they all prayed to Shiva to swallow it since as the god of yoga only he had the power to digest this noxious fluid without being killed by it.
Furious at the way her husband was being treated, Shiva’s wife Parvati gripped his throat to prevent him from ingesting the poison. As a result the color of Shiva’s neck turned blue and he became known as Neelakantha, or “the blue-throated one”.
While stories of venomous poison and diabolical demons provide the fuel for the mythical birth of the Nanjundeshwara Temple, its early development was reputedly guided by two ancient sages tormented by tragic tales of sin, penance, redemption.
The first of these characters was the ancient Vedic sage Gautama, who is said to have installed a Shiva linga where the Nanjundeshwara Temple now stands during a stay in the area.
This, however, must have been a fairly minor incident in Gautama’s eventful life, for he is much more famous for the curse he made on his beautiful young wife Ahalya, the “mind-born” daughter of Brahma, to be invisible to all beings for a thousand years after he discovered she had probably inadvertently been seduced by the god Indra.
Fortunately, Gautama gave Indra a chance to redeem herself if she could show her devotion to Rama when the hero visited the ashram in which he had confined his wife. Subsequently, while Gautama was away carrying out penances in the Himalayas, Rama and his brother Lakshmana came upon the ashram and upon the advice of their guru Vishwamitra restored Indra’s status by touching her feet and accepting her welcome. Consequently, Indra was purified and her husband returned from the Himalayas and took her back as his wife.
The Shiva linga installed by Gautama then attracted the attention of the warrior and sage Parasurama, who was directed by Shiva to carry out his penances there after killing his mother Renuka Deva with an axe on the instructions of his father, who had suspected her of being unfaithful.
When the sage was cleaning up the ground as part of his penance, he accidentally hit the Shiva linga with his axe and blood started flowing from it. But just as he was about to kill himself for injuring the god, Shiva consoled him and asked him to build a temple around the Shiva linga next to the nearby Adi Kesava shrine that already existed there.
Probably not entirely by coincidence, Kesava was the name given to Krishna, an avatar of Vishnu, as praise for slaying the notorious hairy demon Keshi in Hindu mythology. It’s also, of course, the name of the main deity of the Kesava Temple in Somanathapur.
The Shiva linga in the temple reportedly still bears the red wound caused by the axe of Parasurama. The Adi Kesava shrine has also survived and stands next to the main Nanjundeshwara shrine, while a temple dedicated to Parasurama stands nearby on the banks of the Kapila River.