Thirumayam is a place of historical importance in Pudukkottai district and contains three celebrated monuments. They are the Thirumayam Fort and the famous rock-cut shrines of Siva and Vishnu, hewn out of the same rock.
Rock-cut Siva temple, (Satyagirisvara temple)
The cave-temple dedicated to Siva seems to be a Pandyan excavation in the 7th-8th century AD. The cave-temple has a sanctum with a lingam cut out of the parent rock opening sideways into the ardha-mandapa. The ardha-mandapa has the pillar with square top and bottom portion with intervening octagonal shaft. There are bas-reliefs of Lingodhbhava opposite the sanctum and a Ganesha in the ardha-mandapa. A figure of nandi was also carved out of the parent rock in the ardha-mandapa. There is pair of dvarapalas guarding the entrance of the sanctum.
Rock-cut Vishnu temple (Satyamurthi Perumal temple)
This cave temple dedicated to Vishnu is a Muttaraiyar excavation as attested by an inscription recording the renovation of the temple and an endowment by Perumbidugu Perumdevi, mother of Sattan Maran also called Videlvidugu Viluperadiaraiyan, a contemporary and vassal of Pallava king Nandivarman II Pallavamalla (AD 731-796). Nevertheless, the temple is slightly older and dated to closing decades of seventh century.
The temple consists of an ardha-mandapa in front of a rectangular sanctum. In the sanctum there is beautiful and vibrant depictions of Anantasayi Vishnu recumbent on the serpent Adisesha with Lakshmi seated on his chest. He is being shown surrounded by other deities like Garuda, Chitragupta, Markandeya, Brahma, the Devas, the Vasus, and the Kinnaras. There are two demons near the feet of the gods and sheltered there is Bhudevi.
Source:
http://thirumayam.weebly.com/history.html
http://puratattva.in/2011/04/11/thirumayam-the-land-of-truth-18