Lord Vishnu took the Narasimha avatar to kill Hiranyakashipu, a demon king who had received a boon making him nearly invincible. He could not be killed by man or beast, indoors or outdoors, or during day or night, so Vishnu appeared as a half-lion, half-man at twilight on a palace threshold to slay him.