كتاب الكسوف
10  
The Book of Prayer - Eclipses
(1)
Chapter: The Eclipse Prayer
(1)
باب صَلاَةِ الْكُسُوفِ ‏
Sahih Muslim 901 f

'Ata' reported:

I heard 'Ubaid b. 'Umair say: It has been narrated to me by one whom I regard as truthful, (the narrator says: I can well guess that he meant 'A'isha) that the sun eclipsed during the lifetime of the Messenger of Allah (ﷺ) and he stood up (in prayer) for a rigorously long time. He then bowed and then stood up and then bowed and then stood up and then bowed, thus observing three ruku's in two rak'ahs and four prostrations. He then departed and the sun brightened. He pronounced" Allah is the Greatest" while bowing. He would then bow and say:" Allah listened to him who praised Him" while lifting up his head. He then stood up, and praised Allah and lauded Him, and then said: The sun and the moon do not eclipse on the death of anyone or on his birth. But both of them are among the signs of Allah with which Allah terrifies His servants. So when you see them under eclipse, remember Allah till they are brightened.
وَحَدَّثَنَا إِسْحَاقُ بْنُ إِبْرَاهِيمَ، أَخْبَرَنَا مُحَمَّدُ بْنُ بَكْرٍ، أَخْبَرَنَا ابْنُ جُرَيْجٍ، قَالَ سَمِعْتُ عَطَاءً، يَقُولُ سَمِعْتُ عُبَيْدَ بْنَ عُمَيْرٍ، يَقُولُ حَدَّثَنِي مَنْ، أُصَدِّقُ - حَسِبْتُهُ يُرِيدُ عَائِشَةَ - أَنَّ الشَّمْسَ انْكَسَفَتْ عَلَى عَهْدِ رَسُولِ اللَّهِ صلى الله عليه وسلم فَقَامَ قِيَامًا شَدِيدًا يَقُومُ قَائِمًا ثُمَّ يَرْكَعُ ثُمَّ يَقُومُ ثُمَّ يَرْكَعُ ثُمَّ يَقُومُ ثُمَّ يَرْكَعُ رَكْعَتَيْنِ فِي ثَلاَثِ رَكَعَاتٍ وَأَرْبَعِ سَجَدَاتٍ فَانْصَرَفَ وَقَدْ تَجَلَّتِ الشَّمْسُ وَكَانَ إِذَا رَكَعَ قَالَ ‏"‏ اللَّهُ أَكْبَرُ ‏"‏ ‏.‏ ثُمَّ يَرْكَعُ وَإِذَا رَفَعَ رَأْسَهُ قَالَ ‏"‏ سَمِعَ اللَّهُ لِمَنْ حَمِدَهُ ‏"‏ ‏.‏ فَقَامَ فَحَمِدَ اللَّهَ وَأَثْنَى عَلَيْهِ ثُمَّ قَالَ ‏"‏ إِنَّ الشَّمْسَ وَالْقَمَرَ لاَ يَكْسِفَانِ لِمَوْتِ أَحَدٍ وَلاَ لِحَيَاتِهِ وَلَكِنَّهُمَا مِنْ آيَاتِ اللَّهِ يُخَوِّفُ اللَّهُ بِهِمَا عِبَادَهُ فَإِذَا رَأَيْتُمْ كُسُوفًا فَاذْكُرُوا اللَّهَ حَتَّى يَنْجَلِيَا ‏"‏ ‏.‏
Reference : Sahih Muslim 901f
In-book reference : Book 10, Hadith 7
USC-MSA web (English) reference : Book 4, Hadith 1972
  (deprecated numbering scheme)