According to the narrations of the Prophet(peace and blessings be upon him), eclipses are regarded as signs from Allah . One should perform a special prayer which is called Salat Al-Khusuf during one.
Salat Al-Khusuf is a Sunnah, confirmed by the majority of scholars. During the time of the Prophet (peace and blessings be upon him) when an eclipse happens, he would rush to the Mosque and lead the prayer.
Narrated Abu Bakra:
We were with Allah's Messenger (SAW) when the sun eclipsed. Allah's Messenger (SAW) stood up dragging his cloak till he entered the Mosque. He led us in a two-rak`at prayer until the sun (eclipse) had cleared. Then the Prophet (SAW) said, "The sun and the moon do not eclipse because of someone's death. So whenever you see these eclipses pray and invoke (Allah) till the eclipse is over." (Sahih al-Bukhari)
Being a sign from Allah, the eclipse should be a strong reminder for all Muslims to ask for forgiveness as well as engage in doing good deeds.
In one of the Ahadeeth Al Saheehayn, the Prophet (peace and Blessings be upon him) said: "Call on Allah and pray until the eclipse is over."
The emphasis that the Prophet (peace and Blessings be upon him) puts on praying during the time of an eclipse reminds us that it is something that we shouldn't take for granted.
To perform the Salat Al-Khusuf, there are certain things that you should take note of. Let's dive into to it.
First of all, Salat Al-Khusuf cannot be prayed at any random times. It is a special prayer which is only performed when there is an eclipse occurring and its duration depends on the eclipse.
Our beloved Prophet (peace and Blessings be upon him) said: "If you see anything of that, then pray until it is over."
Considering the mentioned Hadith, Salat Al-Khusuf is only valid when there is an eclipse and one cannot perform it once the eclipse is over.
Just like any special Salah, Salat al Khusuf has got its own set of requirements and is prayed quite differently from our daily prayers.
Narrated Aisha (RA):
The Prophet (SAW) led us and performed four bowing in two rak`at during the solar eclipse and the first rak`a was longer. (Sahih al-Bukhari)
Abu Hafs, the freed slave of 'Aishah (RA), narrated that 'Aishah (RA) told him:
"When the sun was eclipsed during the time of the Messenger of Allah (SAW), he performed wudu' and ordered that the call be given: 'As-salatu jami'ah.' He stood for a long time in prayer," and 'Aishah said: "I thought that he (SAW) recited Surah Al-Baqarah. Then he (SAW) bowed for a long time, then he (SAW) said: Sami' Allahu liman hamidah. Then he (SAW) bowed, then prostrated. Then he (SAW) stood up and did the same again, bowing twice and prostrating once. Then he (SAW) sat and the eclipse ended." (Sunan an-Nasa'i)
Here are the steps you can follow to perform the salah:
Prophet Muhammad (peace and Blessings be upon him) is the greatest role model that we could ever have. Even back in the days, he had already set examples that were followed by thousands and millions of people all over the globe.
Among his Sunnah were guidelines of what is expected to be done after Salat Al-Khusoof. It is of his Sunnah to pray the Salat al Khusoof in the congregation. However, it can also be prayed individually.
Narrated `Abdullah bin `Amr (RA):
"When the sun eclipsed in the lifetime of Allah's Messenger (SAW) an announcement was made that a prayer was to be offered in congregation." (Sahih al-Bukhari)
At the end of the Salah, it is also Sunnah to make a Khutbah and warn people against negligence and urge them to ask for forgiveness.
It was narrated from Samurah that:
The Prophet (SAW) delivered a Khutbah when the sun eclipsed and he said: 'Amma ba'd (to proceed).'" (Sunan an-Nasa'i)