Brahma had four sons named Sanaka, Sanandana, Sanatana, and Sanatkumara who led a celibate lifestyle and spent their time meditating on the Lord. Despite being ancient rishis, they appeared youthful and did not possess body-consciousness due to their deep understanding of Brahman. One day, they visited Vaikuntha to meet Lord Vishnu. They had to pass through several gates before reaching the seventh gate of Vaikuntha, where they encountered two gatekeepers named Jaya and Vijaya.
The gatekeepers became upset when the young-looking sages entered without permission. They prevented the sages from approaching Lord Vishnu by blocking their path with staffs. Despite the sages' repeated pleas, the guards refused to let them pass and insulted them. Eventually, the sages became angry and cursed the gatekeepers, predicting that they would be reborn as demons. Upon hearing this, the gatekeepers felt remorse and begged for forgiveness from the sages.
Upon receiving information about the misconduct of his gatekeepers, Lord Vishnu quickly proceeded to the gate accompanied by his Maha Lakshmi Devi. He expressed regret to the four rishis for the mistreatment they had experienced from his employees and acknowledged the curse that was placed upon them. However, Jaya and Vijaya held a special place in his heart as his cherished guards, so he reassured them by saying, "Don't worry. You will have to be reincarnated three times, but eventually, you will be reunited with me."
aya and Vijaya initially incarnated as the offspring of Diti, and transformed into the demons Hiranyakashipu and Hiranyaksha. Hiranyakashipu, the older of the two, was exceedingly proud. He obtained immense power by practicing severe self-discipline and obtained a blessing from Brahma. His tale will be elaborated upon later.
Hiranyaksha, the younger sibling, utilized his strength with a club to expel all the devas from heaven. Subsequently, he entered the ocean to celebrate his victory, but all the sea creatures fled from him out of fear. Eventually, he arrived at the city named Vibhavari, which belonged to Varuna, the god of waters and the ruler of Patala, the underworld. When Varuna approached Hiranyaksha, the latter provoked him to fight. However, Varuna was not interested in fighting and suggested that he should challenge Vishnu instead, who would provide him with a better match.
At the same time, a massive deluge had engulfed the earth, causing it to be submerged underwater. To rescue the earth, Lord Vishnu manifested as Varaha the Boar and raised the earth using his tusks to the surface. During this event, Hiranyaksha appeared and ridiculed Vishnu for taking on the form of a boar. However, Vishnu, in his avatar as Varaha, prioritized saving the earth and thus, he first lifted Dharani to safety before confronting Hiranyaksha.
In the presence of Brahma and the devas, Varaha engaged in combat with Hiranyaksha, wielding a club. Despite the demon's attempts to use magic to deceive and conceal himself from Varaha, the Lord remained undeterred and ultimately employed his Sudarshana discus to dispel the illusions. Hiranyaksha persisted in attacking Varaha with his fists, but with a single strike, Varaha defeated and killed the demon. As a result, Brahma and the devas celebrated and praised Varaha.