Legend holds that this temple is the place where Shiva destroyed three rakshashas and the three cities created by them.
Saranarayana Perumal, another name of Vishnu, is the one who gave the arrow to Shiva for killing the demons, whose temple is also located in the town, little easterly.
Shiva Purana details the legend of destruction of the demon Tripuran, who was ruling Tripura.
The destruction is detailed as a cosmic event, which most attribute to the destruction of stars, meteors and unexplained material bodies.
Tripuran attacked all the celestial deities who sought the help of Shiva to protect them.
Shiva after a fiery fight, destroyed Tripuran and attained the name Tripurantaka.
Shiva ashed down the city Tripura and dipped his three fingers in the ashes, which signifies the three lines of ash which is worn by all shaivites on their forehead.

As per another variant, the three sons of Taraka obtained boons from Brahma and built an impregnable fortress on earth.
On account of their atrocious activities, mother earth prayed to Shiva for rescue.
Shiva burnt down the fort and was about to attack the trio, but they begged for mercy.
He made two of them as Dvarapalas and one as his damaroo, which he sports in his right hand.
The whole incident is believed to have taken place in Thiruvathigai on the banks of Kedilam.
The original name of the place was called Tripura Dahanam, which went on to become Thiruvathigai.
During Tripurasamharam, the killing of Tripurantaka, Shiva forgot to worship Ganesha before setting out for the battle.
He realized it and came back to worship Ganesha and went ahead to win the demon.
The same legend is associated with Aksheeswaraswamy Temple, Acharapakkam and Thiruvirkolam Sri Tripuranthaka Swami temple.
Legend holds that this temple is the place where Shiva destroyed three rakshashas and the three cities created by them. Saranarayana Perumal, another name of Vishnu, is the one who gave the arrow to Shiva for killing the demons, whose temple is also located in the town, little easterly. Shiva Purana details the legend of destruction of the demon Tripuran, who was ruling Tripura. The destruction is detailed as a cosmic event, which most attribute to the destruction of stars, meteors and unexplained material bodies. Tripuran attacked all the celestial deities who sought the help of Shiva to protect them. Shiva after a fiery fight, destroyed Tripuran and attained the name Tripurantaka. Shiva ashed down the city Tripura and dipped his three fingers in the ashes, which signifies the three lines of ash which is worn by all shaivites on their forehead.
As per another variant, the three sons of Taraka obtained boons from Brahma and built an impregnable fortress on earth. On account of their atrocious activities, mother earth prayed to Shiva for rescue. Shiva burnt down the fort and was about to attack the trio, but they begged for mercy. He made two of them as Dvarapalas and one as his damaroo, which he sports in his right hand. The whole incident is believed to have taken place in Thiruvathigai on the banks of Kedilam. The original name of the place was called Tripura Dahanam, which went on to become Thiruvathigai. During Tripurasamharam, the killing of Tripurantaka, Shiva forgot to worship Ganesha before setting out for the battle. He realized it and came back to worship Ganesha and went ahead to win the demon. The same legend is associated with Aksheeswaraswamy Temple, Acharapakkam and Thiruvirkolam Sri Tripuranthaka Swami temple.
Veerateeswarar temple, Thiruvathigai