The temple was originally built by the Pallavas in the 8th century, subsequently expanded by Cholas and later by the Vijayanagara kings in the 15th century. The temple has several inscriptions dating from the 8th century in Tamil and Telugu presumably from the period of Dantivarman, who was a Vishnu devotee. Thirumangai Alvar, the 9th century alvar also attributes the building of temple to the Pallava king. From the internal references of the temple, it appears that the temple was restored during 1564 CE when new shrines were built. In later years, endowments of villages and gardens have enriched the temple. The temple also has inscriptions about the Pallava king, Nandivarman of the 8th Century.