The temple town of Mangalagiri dates back to 1520. The Gajapathi rulers of Kalinga (ancient Odisha) lost it to Timmarasu, the general of Shri Krishna Deva Raya of the Vijayanagara empire. In fact in 1538 Sadasiva Raya of the Vijayanagara Empire was ruling here. Many years later in 1807, Raja Vasireddy Venktadri Nayudu had a temple constructed here whose lofty gopuram is considered an architectural marvel to this day and bears a testimony of the planning and sculpting of that age.
Somewhere during that time Mangalagiri came under the rule of the Golconda Nawabs and stayed so for a long time. Many an attack at different times in history was made, that caused Mangalagiri to be plundered heavily. But during the Vijayanagar rule, the temples of Narayana Swamy were also built and give the place a holy reverence to this day.