As per Hindu legend, King Ambarisha who immersed himself in the worship of Vishnu, failed to strengthen his army and lost his kingdom. While doing worship, he also did not observe the sage Durvasa who went along his way. The sage got irritated and cursed the king. The king went to Vishnu for rescue, who sent his discus to chase the sage. The sage surrendered to Vishnu and begged pardon. The king Ambarishan is believed to have built the temple and hence the presiding deity is also called Ambarisha Varadhar at this place.