If you have been true to your god and you are not in Gehennom, you become invulnerable while praying, i.e. you can't die. Prayer is the only method to become invulnerable. Prayer requires three turns[1] and invulnerability is in effect until the prayer ends.
While you are invulnerable:
- Monsters flinch from melee attacks, and grabbing monsters loosen their grip.[2]
- Swallowing attacks have no effect.[3]
- You are considered unencumbered for healing and exercise/abuse purposes.[4]
- Teleportitis does not operate.[5]
- The usual harassment of a player who has killed the Wizard of Yendor does not operate, e.g. the Wizard will not reappear.[6]
- If trapped in lava, you will not sink further.[7]
- You do not become hungrier.[8]
- Timeouts other than for Luck do not operate; in particular, stoning, sliming, strangulation, vomiting, and illness freeze at the point where the prayer began.[9]
You can also become invulnerable in SLASH'EM by drinking a potion of invulnerability, however, this is vastly different from the invulnerability caused by praying. Notably, not preventing death by any source other than hit-point loss.