 He kicked Vishnu in his chest in anger; the sage atoned here.Chandra sinned by seducing his guru's wife; he partially expiated by worshipping here.The temple is believed to have been built by the Medieval Cholas of the late 8th century AD, with later contributions from Vijayanagar kings and Madurai Nayaks.