The temple is believed to have been initiated during the Medieval Chola period along with many temples dedicated to Rama. The Chola king Parantaka I named himself Sangrama Raghava after his conquest of Sri Lanka, while his son Aditya I was called Kothandarama. Some later Pandya kings also made contributions to the temple. A mutilated inscription in the temple made during the 37th year of Maravarman Sundara Pandyan in 1305 records order of a minister by name Arya Chakravarthi. Historians believe some portions of the temple tower might also have been built by Jaffna kings, who were friends of Pandya Empire and also rulers of Rameswaram. There is one damaged record from 1518 from the period of Mahabali Vanadaraya Naykkar and one another made in 1528 during the reign of Sundarattoludaiyar Mahabali Vanadarayar. There are inscriptions in the temple indicating Arab traders visiting the Pandyan Empire. The traders traded pearl and pepper and in return were allowed to build mosques in the region for their worship. The mosques followed Dravidian architecture with stone pillars and were called Kallupalli. The temple received lot of contributions from the Vijayanagara period, along with other Vishnu temples in the region.