When the sun is eclipsed, total or partial, then the Prophet ﷺ is reported to have performed Salātul Kusūf (solar eclipse prayer). The Prophet ﷺ said:
“Verily, the sun and the moon are two of the signs of Allah and they do not eclipse on account of the death or birth of anybody. So whenever you see this, pray and invoke (Allah) until it is over.
[Related by Muslim]
How it is performed according to the Hanafi school:
When the sun is eclipsed, the imam prays two rak’ahs with the people, like the form of the nafl (supererogatory prayer). There is only one bowing in each rak’ah (just as any other prayer). The imam lengthens the recitation in both (of the rak’ahs) and he makes the recitations (inaudible), according to Abu Hanifa….
Afterwards, he makes a supplication until the sun appears again. The imam who performs the jumu’ah prayer with them prays with the people and if the imam is not present, the people pray it individually.
There is no khutbah for the eclipse prayer.
[Source: Mukhtasar al-Quduri]
How it is performed according to the Maliki, Shafi’i and Hanbali school:
It is a sunnah to perform Salatul Kusuf whenever there is a solar eclipse. According to the Hanafis and Hanbalis, it is nafl. The imam goes to the mosque and begins to lead the people in prayer without either an adhan or an iqama. It is recommended that it be performed in congregation, but it can also be performed at home, by oneself. The complete method to pray the solar eclipse prayer is as follows:
- Make an intention to pray this sunnah prayer and make the opening takbir.
- Recite (inaudibly) the Fatihah and a long surah of the Quran i.e. Surah al-Baqarah or its like.
- Say ‘Allahu Akbar’ and go into ruku. Stay in ruku for a considerable period of time.
- Say ‘Sami’ Allahu li-man Hamida’ and stand back up.
- Recite the Fatiha, again, followed by another long surah of the Quran that is not as long as the previous one i.e. Surah Aali ‘Imran or its like.
- Say ‘Allah Akbar’ and go into ruku, less prolonged than the first.
- Say ‘Sami’ Allahu li-man Hamida’, followed by ‘Rabbana wa laka l-Hamd’.
- Then make two prolonged prostrations (Sajdatain).
- Say ‘Allahu Akbar’ and stand back up.
- Repeat steps (2) through (8), however, not as prolonged as the first; reciting Surah an-Nisa (or its like) in the third standing and Surah al-Ma’idah (or its like) in the fourth.
- Say ‘Allahu Akbar’ and sit back up.
- Finally, say the tashahhud and then the salam
According to the Shafi’is and some Hanbalis, the imam then gives a sermon (Khutbah). However, according to the Malikis, there is no khutbah, but there is no harm in the imam taking the opportunity to admonish and remind the people.
[Sources: Risalah Ibn Abi Zayd || Muqaddimat al-Hadramiyyah || al-‘Umda fi ‘l-Fiqh]