The gate-keepers of Shri Hari’s abode Vaikuntha, Jaya and Vijaya were cursed by the Four Kumaras, sages who roamed the world in the form of children, to be born as asuras (demons). They were born on earth as Hiranyaksha and Hiranyakashipu to the sage Kashyapa and his wife Diti and were one of the Daityas, a race of demons originating from Diti. The demon brothers were manifestations of pure evil and created havoc in the universe. The elder brother Hiranyaksha practised tapas (austerities) and was blessed by Brahma with a boon that made him indestructible by any animal and human forms in the world. He and his brother tormented the inhabitants of earth as well as the gods and engaged in war with the gods. Hiranyaksha took the earth (personified as the goddess Bhudevi) and hid her in the primordial waters. In some versions of the tale, the earth gives a loud cry of distress as she was kidnapped by the demon; in others she, assumes the form of a cow and appealed to Vishnu to rescue her from the clutches of the demon. In some variants, the distressed gods led by Brahma along with the sages go to Vishnu for help. In some versions, the kidnap of the earth by Hiranyaksha is dropped. Instead, the earth sinks on her own to Rasatala due to the weight of the mountains or due to the torture of the demons.
Lord Vishnu listened to the pleas of the Devas and took the form a giant boar or Varaha. He dived into the ocean, to bring the earth up which was waning at the bottom of the ocean. Varaha used its tusks to dig it out of the bottom, and carried towards the surface. The enraged Hiranyaksha interrupted the Varaha, and then commenced a battle which is believed to have lasted for a thousand years. Eventually, Lord Vishnu rescued the earth and restored it to its place in the universe. In this avatar, Vishnu married Prithvi (Bhudevi). It is said that Vishnu balanced the earth on his thigh and due to this a son was born to her. Since his son was created when Vishnu had been involved in a battle, he was an Asura who is the famous Narakasura.