As per Hindu legend, sage Sukhabrahmma was overhearing the Sivarahasya, the secret that Shiva was telling his wife Parvathi in Kailasa. Shiva cursed the sage for the offence. The sage prayed to Shiva to propitiate his sins - Shiva was pleased by the devotion and gave him a boon that he would be born as sage Vyasa in his next birth. It is believed that sage Vyasa resided in this place and worshipped Shiva to relieve off his curse. As per another legend, sage Agastya installed and worshipped a Linga, which is called Agastya Linga. Another legend indicates that Somaskanda depiction is usually indicated with child Skanda (Muruga) depicted between Shiva and Parvathi. This temple has Bala Vinayaga in place of Skanda in the Somaskanda image.