Hiranyakashipu (the brother of Hiranyaksha who was killed by the Varaha Avatar of Lord Vishnu) wanted to take revenge on the devotees and in particular on Lord Vishnu. He wanted to become the master of all the three worlds - Heaven, Earth & Pathala. He went to Mount Mandarachala and began penance which continued for years. Due to the intensity of Penance, Lord Brahma appeared before Hiranyakashipu.Â He asked Lord Brahma for immortality as a reward for his years of penance . Brahma, however, declined, saying "All living beings must face death Hiranyakashipu. You can, however, choose your death wish."
Hiranyakashipu then asked for three conditions, as his death wish, "'O Brahma, let not death come to me either by man or beast, nor devil, nor god shall cause my death by day or by night with steel or stone or wood, indoors or outdoors, or earth or in sky. Grant me undisputed lordship over the world". Brahma agreed and Hiranyakashipu got his death wishes granted. Thus he became practically immortal.
After securing his death wishes Hiranyakashipu conqueredÂ the worlds and became a demon tyrant.Â He banned all pujas to Lord Vishnu and declared himself a God. The devotees of Vishnu approached Lord Vishnu for help.Â Lord Vishnu asked them to be patient. Hiranyakashipu's wife Kayadhu gave birth to Prahlad in the Ashrama of Narada.Â Prahlad grew up and became an ardent devotee of Vishnu.Â Hiranyakashipu, however, wanted his son to be a strong and ruthless King like himself.Â Realizing that Prahlad always prayed to Lord Vishnu, Hiranyakashipu tried to school his son against the influence of Lord Vishnu.Â All their efforts to influence Prahlad against Lord Vishnu failed and Prahlad was still as devoted as ever to Lord Vishnu.
Hiranyakashipu ordered his servants to kill Prahlad if he refused to accept the supremacy of his father. They tried to kill him by throwing down a mountain, drowning, poisoning, and burning him.Â They failed in all their attempts because Lord Vishnu was protecting his devotee.
Â King Hiranyakashipu was very angry on hearing the reports on the failed attempts on the life of his son, Prahlad.One day the king challenged his son in the open court: "Prahlad! Is my enemy, whom you worship, present anywhere here?". Prahlad replied, "Vishnu is omnipresent. There's not a single place where he's not found." Hiranyakashipu's fury was at its climax. He heated an iron pillar and then asked Prahlad, "Can you embrace this pillar if your Vishnu is in it also?"
Prahlad did not hesitate for a moment but rushed towards the pillar and embraced it.Â The heated iron did not burn him.Â The king got up from his throne in fury and hit the pillar with his mace. And to his surprise! The pillar cracked with a thundering sound and Vishnu appeared there in the form of Narasimha.
One half of his body was of a lion and the other half of a man. He had matted hair on his head, large moustaches on the face and terrible teeth in the mouth. His paws had terrible nails on them. Hiranyakashipu remembered his first death wish, "To be killed by some one who is neither human nor beast." It was also the twilight hour, neither day nor night, the second death wish. The demon king hit Narasimha with his mace but Narasimha brushed it aside swiftly. It was twilight and Narasimha caught hold of the demon Hiranyakashipu.
Â He sat on the threshold of the court room, placed the body of the demon on his thighs, and pierced his nails into the body of the demon and broke open his stomach. The demon was killed on the spot in a moment. The place was neither inside nor outside. This was Hiranyakashipuâ€™s third death wish. Lord Narasimha was furious and roared.Â However, he was pacified when Prahlad touched his feet and goddess Lakshmi also tried to cool him.Â Lord Narasimha then made Prahlad the King.