References to modern day Mahabalipuram as a busy port is available in the works of Ptolemy from CE 140. There are many references to the place from Sangam Literature from third century CE. The temple is referred in the works of seventh century works of Bhoothath Alvar and eighth century works of Thirumangai Alvar. The port city came to prominence during the reign of Pallava kings Mahendravarman I and his son Narasimhavarman I after whom the city is named.
The city was a famous port city during the reign of Medieval Cholas from the 9th century. There are inscriptions in the temple indicating grants of 1000 kulis during the 20th year of reign of Ko-Parakesarivarman.
The northern wall has inscriptions of Dalavay Thirumalanayaka giving grants of lands in Kunnatur village to the temple. There are various other inscriptions indicating grants to the temple from various villages. The inscriptions from Shore Temple indicates grant of 2000 kulis of land to the temple during the reign of Rajendra I during the 11 century. There are similar inscriptions from Varaha Cave Temple about grant of lands during the same reign.
The temple also had expansions by Chola king Vikrama Chola (1118-35 CE) during 1120 CE.The earliest inscription from the temple is from the reign of Vikrama Chola (1118–1135 CE), but the inscription is damaged.
Another inscription made during the reign of Kulothunga Chola II (1133–1150 CE) indicates gift to meet the expenses towards recitation of Thirupalli Ezhuchi in the temple. There are inscriptions from Rajanrayana Sambuvaraya, the feudatory of Cholas. The inscriptions from Telugu Choda dynasty during 1252 CE mentions gifts to Brahmanas for the perpetual lighting of the temple. The inscription made during the reign of Pandyas during 1288 CE indicates gift for the feeding house of the temple.
During the 14th century, the Vijayanagara king Parankusa shifted the temple to its current location away from the shore. He is believed to have built the four Mada streets around the temple.
The Shore Temple located on the shore is believed to be the original shrine housing two images of Shiva on either side of the image of Vishnu. There are many land grants made during the rule of the Vijayanagara kings.
Sculptures on the wall of the temple
Panoramic view of the temple
The temple is located in Mahabalipuram, a historic town on the outskirts of Chennai. The temple is located close to Arjuna's Penance,[9] the most famous landmark of the Group of Monuments at Mahabalipuram. The temple is also believed to be the birthplace of Bhoothath Alvar, the 2nd Alvar, the poet saints of 7th-9th centuries. The temple has a seven tiered rajagopuram built during 15-16th century. The granite base of the entrance is studded with sculptures.
There are two precincts inside the temple with the sanctum is located axial to the main gate and approached through a Dvajasthambam, bali peetam (sacrificial altar), Deepa Stambam (altar for lamps) and Garuda Mandapam. The sanctum houses the image of Sthalasayana Perumal, the presiding deity, in reclining posture. The image is sported with Ahvahanahasta, which indicates beckoning devotees to him. The image of Pundarika Maharishi is seen in standing posture.
The entrance of the temple
The processional deity, namely Ulaguyyaninran, sported with four arms, is housed in the sanctum. There is an east facing shrine to the right of sanctum for Lakshmi, the consort of Perumal, in the form of Nilamangai Thayar. There are shrines for Andal, Lakshmi Narasimha, Bhoothath Alvar, Rama, and Alvars in the first precinct around the sanctum.
There is a shrine for Hanuman opposite to the shrine of Rama. There is a four pillared hall, with sculpted pillars in front of the temple, was designed for Dolotsavam (swing festival). The temple tank is located outside the temple and is called Pundarika Pushkarani. It has a small pillared mandapa in its centre.