An eclipse of the sun took place in the time of the Messenger of Allah ﷺ. The Prophet ﷺ led them in prayer. He recited one of the long surahs, bowing five times and prostrating himself twice. He then stood up for the second rak'ah, recited one of the long surahs, bowed five times, prostrated himself twice, then sat where he was facing the qiblah and made the supplication till the eclipse was over.
حَدَّثَنَا أَبُو جَعْفَرٍ الرَّازِيُّ وَهَذَا لَفْظُهُ وَهُوَ أَتَمُّ عَنِ الرَّبِيعِ بْنِ أَنَسٍ عَنْ أَبِي الْعَالِيَةِ عَنْ أُبَىِّ بْنِ كَعْبٍ قَالَ انْكَسَفَتِ الشَّمْسُ عَلَى عَهْدِ رَسُولِ اللَّهِ ﷺ وَإِنَّ النَّبِيَّ ﷺ صَلَّى بِهِمْ فَقَرَأَ بِسُورَةٍ مِنَ الطُّوَلِ وَرَكَعَ خَمْسَ رَكَعَاتٍ وَسَجَدَ سَجْدَتَيْنِ ثُمَّ قَامَ الثَّانِيَةَ فَقَرَأَ سُورَةً مِنَ الطُّوَلِ وَرَكَعَ خَمْسَ رَكَعَاتٍ وَسَجَدَ سَجْدَتَيْنِ ثُمَّ جَلَسَ كَمَا هُوَ مُسْتَقْبِلَ الْقِبْلَةِ يَدْعُو حَتَّى انْجَلَى كُسُوفُهَا