The temple is believed to have been built by the Pallavas of the late 8th century AD, with later contributions from Medieval Cholas and Vijayanagar kings. The temple has three inscriptions on its walls, two dating from the period of Kulothunga Chola I (1070–1120 CE) and one to that of Rajadhiraja Chola (1018-54 CE). A granite wall surrounds the temple, enclosing all the shrines and two bodies of water. There is a 3-tiered "rajagopuram", the temple's gateway tower, in the temple.