Sthalasayana Perumal Temple also known as Thirukadalmallai is at Mahabalipuram. Constructed within the Dravidian style of structure, the temple is glorified in the Divya Prabandha, the early medieval Tamil canon of the Azhwar saints from the 6th to 9th centuries AD. It is one of the 108 Divyadesam devoted to Vishnu, who's worshiped as Stalassayana Perumal and his consort Lakshmi as Nilamangai Thayar. The temple changed into believed to be constructed by using Pallavas, with later contributions from Medieval Cholas, Vijayanagar kings and Madurai Nayaks. References to trendy day Mahabalipuram as a busy port is available in the works of Ptolemy from AD 140.
There are many references to the area from Sangam Literature from 4th century AD. The temple is mentioned in works of 7th century works of Bhoothath Azhwar and 8th century works of Thirumangai Azhwar. The metropolis named after the town of Pallava kings Mahendravarman I and his son Narasimhavarman I after whom the city is named. The town changed into a famous port city in the course of the reign of Medieval Cholas from the 9th century. There are inscriptions inside the temple indicating presents of 1000 kulis for the duration of the 20th year of Ko Parakesarivarman. The northern wall has inscriptions of Dalavay Thirumalanayaka giving offers of lands in Kunnatur village to the temple. There are distinctive other inscriptions indicating offers to the temple from exclusive villages.