Markandeya Purana details the history of the temple. A sage named Salihotra had his hermitage in this place. He used to grind rice for a living and offered half of the flour to the seekers and used to consume the rest himself. He was an ardent devotee of Vishnu. To test his devotion, Vishnu appeared as a guest to him one day. He requested Salihotra to offer him food, which the sage did. The guest felt hungry and requested the sage to offer more food. The sage offered the other half portion of the flour which he used to consume himself. The guest asked a place to rest and the sage readily offered his hermitage. On arriving at the hermitage, the guest revealed his true form and blessed the sage.