Sthala Puranam of Mahanandi Temple (Religious history of Mahanandi Temple) dates back to the Kings of Nandyal. The legend is associated with a cow and a child.
The legend says that, Nanda one of the Kings of Nandyal, once wished to perform Abhisekam to Lord Siva, with milk.He ordered for the supply of milk for Pooja. One of the cowherd of Gopavaram village, who in charge of this duty observed that one of the cows coming empty every day. In order to find out what is happening to the milk of this cow, he followed the cow to forest and hide himself in a thick bush.
The cow as usual reached an ant-hill grazed around for a while and began to empty its milk. A young lad was sucking the milk.The cowherd who was astonished at this sight, conveyed the news to the King.
The King was amazed and decided to ascertain the fact. The next day, he followed the cow-herd and hide himself in the thick bush. As usual the cow began to give her milk on the ant-hill. The young lad began to drink the milk, when the King was over enjoyed at the sight, God disappeared immediately and the cow in its hurry trampled the ant-hill. The hoops of the cow are deeply marked on the ant hill.
Lord Siva appeared in the dream of the King and told the him to worship him at that place. The King constructed a temple.
Till today the marks of hoops are clearly visible on the Siva Lingam. The Shivalingam is being touched and worshipped by one and all. The story of King Nanda, the building of the temple may appear to be of mythological interests to the present day historian, But inscriptions on the stones a round Mahanandi Temple speak about the antiquity of the temple.
A mention is made of this place as Mahanandi Theertha on the copper plate inscriptions of King Krishna Devaraya of the Vijaya Nagaram Empire. King Narasimha Devaraya of Vijayanagaram Dynasty made valuable Gifts to this temple.