Varaha Jayanti - Agni Purana 1.3
Of all his domains, Hiranyaksha enjoyed most of all the ocean, and came to live in Varuna's palace under the waters. But he also loved the Earth, and so he pulled Her down into the ocean to live with him, causing Her considerable misery.
By now, Brahma understood that, despite his good intentions, he had permitted something terrible to happen by granting this wish. So he led the Devas to Vishnu and asked that Vishnu do something about Hiranyaksha, and his despicable treatment of the Earth. The Devas should be restored to the Devaloka, and the Earth should be brought back from the ocean's depths. Vishnu agreed something should be done. In the form of a boar, Vishnu entered the ocean - and frolicing and playing, swimming in the vast waters. This attracted the attention of the Earth, who fell in love with Vishnu; she called to him, and this is how Vishnu was able to find the Earth. He dived down, and lifted Her in his tusks, carrying Her out of the waters.
Hiranyaksha did not know that this boar was Vishnu, and thought it was an ordinary boar coming to steal his love. So he attacked the boar. Soon, it became apparent this was no ordinary boar! As they fought, Hiranyaksha saw the boar's feet were the vedas, his tusks were sacrificial stakes, his teeth offerings, his mouth an altar, his tongue the sacred flame! Too late, he understood: it was Vishnu, in the form of sacrifice itself! Vishnu bent time, and the battle stretched on for a thousand years. Vishnu wore down the will of Hiranyaksha, tiring him; the more Hiranyaksha fought with Vishnu, the more he admired Vishnu, and became reluctant to keep fighting. Hiranyaksha then at last understood he had done terrible wrong, and regretted that he had asked to be invincible: it was that gift that spurred him to try to conquer every world, and even fight Vishnu. Now, Hiranyaksha's pride was subdued, and he asked Brahma to take back the gift given him, and asked Vishnu to end his shame. Brahma agreed, and Vishnu gored Hiranyaksha with his tusks.
Upon seeing Her champion victorious, the Earth fainted, and began to sink under the ocean again. Once more, Vishnu lifted her up.
The Earth had fallen in love with Vishnu, and Vishnu recognized Her as his Consort; they married, and had a son, Naraka. But the Earth asked Vishnu for two gifts for their child: that he be all powerful, and have a long life. Despite the good intentions, these gifts ultimately led to Naraka becoming evil, like Hiranyaksha, and required both Vishnu (as Krishna) and the Earth (as Satyabhama) to subdue him, as well.