Allaah says (interpretation of the meaning):
“It is He Who made the sun a shining thing and the moon as a light and measured out its (their) stages, that you might know the number of years and the reckoning. Allah did not create this but in truth. He explains the Ayat (proofs, evidences, verses, lessons, signs, revelations, etc.) in detail for people who have knowledge. ” [Yoonus 10:5]
Narrated Abu Musa (R.A):
The sun eclipsed and the Prophet got up, being afraid that it might be the Hour (i.e. Day of Judgment). He went to the Mosque and offered the prayer with the longest Qiyam, bowing and prostration that I had ever seen him doing. Then he said, “These signs which Allah sends do not occur because of the life or death of somebody, but Allah makes His worshipers afraid by them. So when you see anything thereof, proceed to remember Allah, invoke Him and ask for His forgiveness.” Volume 2, Book 18, Number 167:Sahih Bukhari
During the Jaahiliyyah, people used to believe that eclipses happened to mark the birth or death of a great person, but the Messenger of Allaah (pbuh) declared this belief to be false and explained the divine wisdom behind the occurrence of eclipses.
Narrated Al-Mughira bin Shu’ba (R.A):
“The sun eclipsed in the life-time of Allah’s Apostle (pbuh) on the day when (his son) Ibrahim died. So the people said that the sun had eclipsed because of the death of Ibrahim. Allah’s Apostle said, “The sun and the moon do not eclipse because of the death or life (i.e. birth) of some-one. When you see the eclipse pray and invoke Allah.” Volume 2, Book 18, Number 153:Sahih Bukhari
Narrated Abu Masud (R.A):
The Prophet (pbuh) said, “The sun and the moon do not eclipse because of the death of someone from the people but they are two signs amongst the signs of Allah. When you see them stand up and pray.” Volume 2, Book 18, Number 151:Sahih Bukhari
Narrated Ibn ‘Umar(R.A):
The Prophet said, “The sun and the moon do not eclipse because of the death or life (i.e. birth) of someone but they are two signs amongst the signs of Allah. When you see them offer the prayer.” Volume 2, Book 18, Number 152:Sahih Bukhari
Salaat al-Kusoof is Sunnah mu’akkadah (a confirmed Sunnah) according to the consensus of the scholars. The daleel (evidence) for this is the Sunnah reported from the Messenger of Allaah (pbuh).
When the sun was eclipsed at the time of the Prophet (pbuh), he went out rushing nervously to the mosque, dragging his cloak behind him, and led the people in prayer. He told them that the eclipse was one of the signs of Allaah, with which Allaah makes His slaves afraid, and that it may be the cause of punishment coming upon the people. He commanded them to do that which could prevent the punishment, so he commanded them to pray when an eclipse happens, and to make du’aa’, seek His forgiveness, give charity, free slaves and do other righteous deeds so that the punishment would go away and not befall the people. So the eclipse is a reminder to people, making them afraid so that they will turn back to Allaah and pay attention to Him.
The time for Salaat al-Kusoof lasts from the beginning of the eclipse until it is over,
“Narrated Abu Bakra (R.A): We were with Allah’s Apostle when the sun eclipsed. Allah’s Apostle stood up dragging his cloak till he entered the Mosque. He led us in a two-Rakat prayer till the sun (eclipse) had cleared. Then the Prophet (p.b.u.h) 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.” Volume 2, Book 18, Number 150: Sahih Bukhari
Salaat al-Kusoof should not be done once the eclipse is over, because the time has gone. If an eclipse ends before one knows about it, one does not have to pray, because the reason for this prayer is no longer there.
The way in which Salaat al-Kusoof is done is to pray two Rak’ahs in which Qur’aan is recited aloud, according to the correct one out of the two scholarly opinions. In the first Rak’ah, one should recite al-Faatihah and a long soorah such as Soorat al-Baqarah or the equivalent, then do a long rukoo’, then raise one’s head and say, “Sami’a Allaahu liman hamidah, Rabbanaa wa laka’l-hamd (Allaah listens to the one who praises Him; our Lord to You be praise)” after standing upright, as in other prayers. Then one should then recite al-Faatihah and another long soorah, shorter than in the first recitation, equivalent in length to Soorat Aal ‘Imraan. Then one should do another long rukoo’ shorter than the first, and when raising one’s head, say, “Sami’a Allaahu liman hamidah, Rabbanaa wa laka’l-hamd hamdan katheeran tayyiban mubaarakan fih, mal’ al-samawaati wa mal’ al-ard wa mal’ ma shi’ta min shay’in ba’d (Allaah listens to the one who praises Him; our Lord to You be praise, much good and blessed praise, filling heaven and earth and whatever You will besides that).” Then he should do two lengthy sujoods, without making the sitting between them too long. Then one should pray the second rak’ah like the first, with two long rukoo’s and two long sujoods, as he did in the first rak’ah. Then he should recite the Tashahhud and say the salaam.
This is the description of Salaat al-Kusoof as prayed by the Prophet (pbuh), as was reported with a number of isnaads. Some of these reports are in al-Saheehayn, including the hadeeth narrated by ‘Aa’ishah (R.A): “The sun was eclipsed at the time of the Messenger of Allaah(pbuh), and the Messenger of Allaah (pbuh)) went out, stood up and said Takbeer (‘Allaahu akbar’), and the people formed rows behind him. The Messenger of Allaah (pbuh) recited a lengthy recitation and did a lengthy rukoo’, then he raised his head and said, ‘Sami’a Allaahu liman hamidah, Rabbanaa wa laka’l-hamd.’ Then he stood upright and recited another lengthy recitation, shorter than the first. Then he said ‘Allaahu akbar’ and did another lengthy rukoo’, shorter than the first. Then he said, ‘Sami’a Allaahu liman hamidah, Rabbanaa wa laka’l-hamd.’ Then he did sujood. Then in the second rak’ah he did likewise, until he had completed four rukoo’s and four sujoods, and the eclipse was over before he had finished.”
Narrated ‘Aisha (R.A):
In the lifetime of the Prophet the sun eclipsed and he went to the Mosque and the people aligned behind him. He said the Takbir (starting the prayer) and prolonged the recitation (from the Quran) and then said Takbir and performed a prolonged bowing; then he (lifted his head and) said, “Sami allahu liman hamidah” (Allah heard him who sent his praises to Him). He then did not prostrate but stood up and recited a prolonged recitation which was shorter than the first recitation. He again said Takbir and then bowed a prolonged bowing but shorter than the first one and then said, “Sami ‘a-l-lahu Lyman hamidah Rabbana walak-lhamd, (Allah heard him who sent his praises to Him. O our Sustainer! All the praises are for You)” and then prostrated and did the same in the second Raka; thus he completed four bowing and four prostrations. The sun (eclipse) had cleared before he finished the prayer. (After the prayer) he stood up, glorified and praised Allah as He deserved and then said, “The sun and the moon are two of the signs of Allah. They do not eclipse because of the death or the life (i.e. birth) of someone. When you see them make haste for the prayer.” Narrated Az-Zuhri: I said to ‘Ursa, “When the sun eclipsed at Medina your brother (‘Abdullah bin Az-Zubair) offered only a two-Rakat prayer like that of the morning (Fajr) prayer.” ‘Ursa replied, “Yes, for he missed the Prophet’s tradition (concerning this matter).” Volume 2, Book 18, Number 156:Sahih Bukhari
Narrated Aisha (R.A):
On the day when the sun Khasafat (eclipsed) Allah’s Apostle prayed; he stood up and said Takbir and recited a prolonged recitation, then he performed a prolonged bowing, then he raised his head and said, “Sami’a-l-lahu Lyman Hamidah,” and then remained standing and recited a prolonged recitation which was shorter than the first. Then he performed a prolonged bowing which was shorter than the first. Then he prostrated and prolonged the prostration and he did the same in the second Raka as in the first and then finished the prayer with Taslim. By that time the sun (eclipse) had cleared He addressed the people and said, “The sun and the moon are two of the signs of Allah; they do not eclipse (Yakhsifan) because of the death or the life (i.e. birth) of someone. So when you see them make haste for the prayer.” Volume 2, Book 18, Number 157:Sahih Bukhari
It is sunnah to pray Salaat al-Kusoof in jamaa’ah (congregation), because this is what the Prophet (pbuh) did, but it is permissible to pray it individually, as with all other naafil prayers. However, praying it in congregation is better.
It is sunnah for the imaam to address the people after the prayer, and to warn them against negligence and being led astray, and to tell them to make lots of du’aa’ and ask for forgiveness. In al-Saheeh it is narrated from ‘Aa’ishah (may Allaah be pleased with her) that the Prophet SAWS (pbuh) finished his prayer then addressed the people and started by praising Allaah then he said, “The sun and the moon are two of the signs of Allaah, and they do not become eclipsed for the death or the birth of anyone. If you see that, then call on Allaah, perform salaah, give charity…”
Narrated ‘Abdullah bin ‘Amr (R.A)
When the sun eclipsed in the lifetime of Allah’s Apostle and an announcement was made that the prayer was to be held in congregation. The Prophet performed two bowing in one Raka. Then he stood up and performed two bowing in one Raka. Then he sat down and finished the prayer; and by then the (eclipse) had cleared ‘Aisha said, “I had never performed such a long prostration.” Volume 2, Book 18, Number 160:Sahih Bukhari
If the prayer ends before the eclipse does, then remember Allaah (dhikr) and call on Him (du’aa’) until the eclipse ends. The prayer should not be repeated. If the eclipse ends before the prayer, then the prayer should be completed quickly, but it should not be stopped or cut off abruptly, because Allaah says (interpretation of the meaning): “and render not vain your deeds” [Muhammad 47:33]. The prayer should be at the time of the eclipse, because the Prophet (pbuh) said: “… until it (the eclipse) is over…” and he also said, “… until what you are going through is over …”
Shaykh Ibn Taymiyah said: “Sometimes eclipses last for a long time, and sometimes for a short time, depending on how much of the sun or moon is eclipsed. The entire sun or moon may be eclipsed, or only half of it, or one-third. If it is a total eclipse, then the prayer should last long enough for all of al-Baqarah or something of similar length to be recited in the first rak’ah, and in the next rak’ah a shorter recitation is made. There are saheeh ahaadeeth narrated from the Prophet (pbuh), as we have mentioned, and it is prescribed to shorten the prayer if the reason for it [i.e., the eclipse] is no longer there. So if it is known that the eclipse will not last for long, or if it started to get less, one should still pray, but the prayer should be shortened. This is the opinion of the majority of scholars, because this prayer is prescribed for a specific reason, and if the reason is no longer there and the eclipse is over, one should not pray.”
Allah knows the best.