As per another legend, Brahma and Shiva both had originally five heads. Parvati, the wife of Shiva, once got confused and worshipped Brahma, instead of her husband. Shiva got enraged and cut off one of Brahma's heads; the head stuck in Shiva's hand due to Brahma's curse. To atone for the sin, Shiva worshipped Vishnu here; Shiva was fully relieved of the curse after worshipping Vishnu at Hara Saabha Vimocchana Perumal Temple.