Most prayers are fixed to the clock. A few are fixed to events instead — moments when the Prophet ﷺ turned to prayer because something had happened. They are all voluntary and rarely needed, which is exactly why they are easy to forget.
The eclipse prayer (salat al-kusuf)
When the sun eclipsed in Madinah, it happened to be the day the Prophet's ﷺ young son Ibrahim died, and people said the eclipse was because of his death.4 He went to the mosque, led a long prayer until the eclipse had cleared,3 and corrected them:
"The sun and the moon are two signs amongst the signs of Allah. They do not eclipse because of someone's death or life. So when you see them, invoke Allah and pray till the eclipse is clear."
— Sahih al-Bukhari 10605
It applies to both solar and lunar eclipses ("when you see them"), and alongside the prayer he told them to remember God, say takbir, and give charity.16 'Aisha described what he did:12
- 1
A long recitation
Begin the prayer with the takbir and recite at length.
- 2
A long bowing
Bow for a long time, then rise saying Sami'a Allahu liman hamidah — but do not prostrate yet.
- 3
A second recitation and bowing
Recite again, a little shorter than the first time, then bow again, a little shorter than the first bowing, and rise.
- 4
Prostrate as usual
Make the two prostrations, long, as in any prayer. That completes the first rak'ah.
- 5
Repeat, then the sermon
Pray the second rak'ah the same way — four bowings and four prostrations in all — and end with the tasleem. The imam then gives a sermon.
All agree it is an emphasised sunnah, and that the time for it is while the eclipse lasts — with remembrance of God, du'a, and charity alongside.171819
The prayer for rain (salat al-istisqa)
In drought, the Prophet ﷺ led the community out to the open prayer-ground. Ibn 'Abbas described him going "wearing old clothes in a humble and lowly manner," spending the time in supplication and takbir rather than a usual sermon, and then praying "two rak'ahs of prayer as done on the 'Id."9 Other companions add that he faced the qibla, turned his cloak inside out, and recited aloud in the two rak'ahs.78
He also asked for rain without a separate prayer. When a man stood up during the Friday sermon and said the livestock were dying, the Prophet ﷺ raised his hands and said three times:
Asking for rain 10
اللَّهُمَّ اسْقِنَا، اللَّهُمَّ اسْقِنَا، اللَّهُمَّ اسْقِنَا
Allāhumma-sqinā, Allāhumma-sqinā, Allāhumma-sqinā
O Allah, give us rain. O Allah, give us rain. O Allah, give us rain.
It rained for a week — until the man came back the next Friday and asked him to pray for it to stop.
The prayer of repentance (salat al-tawbah)
After a sin, the way back has a simple shape. Abu Bakr narrated that he heard the Prophet ﷺ say:
"When a servant (of Allah) commits a sin, and he performs ablution well, and then stands and prays two rak'ahs, and asks pardon of Allah, Allah pardons him."
He then recited this verse:
"And those who, when they commit an immorality or wrong themselves [by transgression], remember Allah and seek forgiveness for their sins — and who can forgive sins except Allah? — and [who] do not persist in what they have done while they know."
— Quran 3:135 (Saheeh International)13
So: make wudu carefully, pray two rak'ahs like any two-rak'ah prayer, then ask God's forgiveness in your own words — sincerely, resolving not to return to it.
The prayer of fear (salat al-khawf)
The Quran allows the prayer to change shape in danger. If there is no safety at all, pray however you can — "on foot or riding"15 — and in battle, the congregation can pray in shifts so that some always stand guard.14 Ibn 'Umar described one such prayer: half the army prayed one rak'ah behind the Prophet ﷺ while the other half faced the enemy; then they changed places, and each group completed its second rak'ah on its own.16 It is rarely needed today, but it shows how seriously the prayer is held: even in battle, it is adjusted, not abandoned.
In short
When the sun or moon is eclipsed, pray the long eclipse prayer and give charity. In drought, go out humbly and pray for rain. After a sin, make wudu, pray two rak'ahs, and seek forgiveness. In danger, pray in whatever way you can. For the full map of voluntary and occasional prayers, see Beyond the Five.