Samudragupta is presumed to have conquered the region, as in his Allahabad inscription, it has been mentioned that, he had conquered Mahêndra of Kôsala, Vyâghraraja of Mahâkantâra, Mantarâja of Kêrala, Mahêndra of Pishtapura, Svâmidatta of Kottûra on the hill, Damana of Êrandapalla, Vishnugôpa of Kâñchi, Nîlarâija of Avamukta, Hastivarman of Vengî, Ugrasêna of Palakka, Kubêra of Dêvarâshtra, Dhanamjaya of Kusthalapura, and others.
With the rise of the Pandya power in the south, the Cholas had lost most of their control of the territories south of the river Kaveri and their hold on the Vengi territories in the north was slipping with the emergence of the Hoysala power.
As per the writings on the temple wall this temple is believed to be constructed by the King Pulakesi II of Chalukya dynasty around 625 A.D to commemorate his victory over Vengi region of Andhra Desham.
After the death of the Chola king in 1070, Vikramaditya VI invaded the Tamil kingdom and installed his brother-in-law, Adhirajendra, on the throne creating conflict with Kulothunga Chola I, the powerful ruler of Vengi who sought the Chola throne for himself.