It was mentioned in Padma Purana that Suryanarayana (Sun God) born to Sage Kashyap and Aditi. It was the Sage Kashyap who installed Suryanarayana (Sun God) at this place.
As per the legends, during Dwaparayuga, Balarama brother of Lord Krishna brought the river Nagavali with his plough and built a temple on the banks of the river. All Devas worshipped the Lord Rudra Koteswara and Goddess Uma (Parvati) at this temple. Indra, the Heaven God arrived late and tried to enter the temple. Nandi the Divine Gatekeeper, who was guarding the entrance stopped him from entering to prevent any disturbance his master. Indra remained adamant over his demand in entering the temple which made Nandi angry. Nandi thereupon kicked him strongly with his foot and thrown him miles away from the temple on the eastern side. Indra laid in an unconscious state with body pains. It is said that Indra relieved from the body pains by installing and worshipping the Sun God at his place. Indra created a water pool with his weapon Vajrayudha which was called by IndraPushkarini.