In a mythical story it is said that sages had travelled long distances in order to meet Lord Vishnu. They became infuriated at the impudence shown by Jaya and Vijaya, the dwarapalakas. The Rishis or sages cursed the Jaya and Vijaya to be born as earthly beings and roam around the earth.
Jaya and Vijaya, the dwarapalakas informed Lord Vishnu about what had happened and the curse. Vishnu was dissatisfied at the imprudence shown by Jaya and Vijaya when the followers of Lord Vishnu had come to meet him. He loves his followers and has time to meet all of them. Lord Vishnu replied to Jaya and Vijaya that he could not withdrew the curse. The lord gave them the way how they can live out the nuisance. Vishnu gave Jaya-Vijaya the choice either to be born several many times as great disciples of the Lord Vishnu, or as powerful individuals that were the sworn enemies of the Lord Vishnu, and to die at the hands of Lord Vishnu.
The door-keepers preferred to be born a few times as enemies of Lord Vishnu. They were reborn as the demons many times. They were born as Madhu and Kaitabh, Hiranyaksha and Hiranyakasipu, Ravana and Kambhakarna, and Kansa and Shishupala.
In the Kali Yuga, Jaya and Vijaya are believed to be free from their curse and again became the dwarapalakas or gatekeepers of Vaikuntha. There are many temples in India where stands the idols of Jaya and Vijaya. The temples with their statues are the temple of Venkatesvara , the temple of Jagannath in Puri, and the Ranganatha Temple in Srirangam.