The presiding deity is Kokarneswarar considered to be a form of the Hindu God Shiva.
His consort Brihadambal is the family deity of the Thondaiman kings which ruled the princely Pudukkottai state.
The Pallava-era rock-cut temple was constructed by the Pallava king Mahendravarman I sometime around the middle of the 7th century CE.
Later additions were made in the early 2nd millennium by the Chola and Pandya dynasties.
There is also an idol of the saint Sadasiva Brahmananda beneath a bikula tree, who is the Guru of the Thondaiman kings of Pudukkottai state.