Sahih al-Bukhari 1040
Book 16: Eclipses · Narrated by Abu Bakra
Arabic
حَدَّثَنَا عَمْرُو بْنُ عَوْنٍ، قَالَ حَدَّثَنَا خَالِدٌ، عَنْ يُونُسَ، عَنِ الْحَسَنِ، عَنْ أَبِي بَكْرَةَ، قَالَ كُنَّا عِنْدَ رَسُولِ اللَّهِ صلى الله عليه وسلم فَانْكَسَفَتِ الشَّمْسُ، فَقَامَ النَّبِيُّ صلى الله عليه وسلم يَجُرُّ رِدَاءَهُ حَتَّى دَخَلَ الْمَسْجِدَ، فَدَخَلْنَا فَصَلَّى بِنَا رَكْعَتَيْنِ، حَتَّى انْجَلَتِ الشَّمْسُ فَقَالَ صلى الله عليه وسلم " إِنَّ الشَّمْسَ وَالْقَمَرَ لاَ يَنْكَسِفَانِ لِمَوْتِ أَحَدٍ، فَإِذَا رَأَيْتُمُوهُمَا فَصَلُّوا، وَادْعُوا، حَتَّى يُكْشَفَ مَا بِكُمْ ".
English translation
Narrated Abu Bakra:We were with Allah's Messenger (ﷺ) when the sun eclipsed. Allah's Messenger (ﷺ) stood up dragging his cloak till he entered the Mosque. He led us in a two-rak`at prayer till the sun (eclipse) had cleared. Then the Prophet (ﷺ) 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
Reference: Sahih al-Bukhari 1040, Book of Eclipses. English translation by Dr. Muhammad Muhsin Khan.