Legends: Shiva blessed the gods with a vision of the Cosmic Dance and this stalam remained untouched through the great deluge. Agasthyar, Surya, Chandra, Bhrama and Vishnu worshipped Shiva here. Sundarar is believed to have dropped his gold in the Manimuttar river here, and retrieved it in the Kamalalayam tank at Tiruvarur.
The temple covers 4 acres; it has 3 courtyards and is surrounded by walls with towers. Therte are seven storied entrances on 4 sides. The outermost prakaram is called Kailasa Prakaram. Sage Vipachit built the earliest structure of this temple, and his image is kept under the vanni tree here.
Sembiyan Mahadevi, the Chola queen reconstructed the temple in stone in the 10th century. The innermost structures - the sanctum and the ardhamandapam belong to her period. The niche images include those of Vinayakar, Dakshinamurthy, Lingodbhavar, Bhrama, Gangadharar and Ardhanareeswarar.
Panels of miniature sculptures are seen in this temple. The Natarajar and the Bhogeswari bronze images go back to the 10th century. The Nandi Mandapam was constructed in her memory.
Festivals: Three annual festivals are celebrated here - one in the month of Aadi (Pooram), the Vaikasi Vasantotsavam and the Maasi Bhramotsavam.