Narasimha the 4th Avatar of Lord Vishnu
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.
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.