عَنْ قَبِيصَةَ رَضِيَ اللَّهُ عَنْهُ قَالَ: انْكَسَفَتِ الشَّمْسُ فَخَرَجَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَآلِهِ وَسَلَّمَ فَصَلَّى رَكْعَتَيْنِ فَأَطَالَ فِيهِمَا الْقِرَاءَةَ، فَانْجَلَتْ، فَقَالَ: ((إِنَّ الشَّمْسَ وَالْقَمَرَ آيَتَانِ مِنْ آيَاتِ اللَّهِ تَبَارَكَ وَتَعَالَى يُخَوِّفُ بِهِمَا عِبَادَهُ، فَإِذَا رَأَيْتُمْ ذَلِكَ فَصَلُّوا كَأَحْدَثِ صَلَاةٍ صَلَّيْتُمُوهَا مِنَ الْمَكْتُوبَةِ))
Sayyiduna Qabeesah (may Allah be pleased with him) says: The sun was eclipsed, so the Messenger of Allah (peace and blessings be upon him) came out and led two units of prayer, and he prolonged the recitation in them, until the sun became clear. Then he (peace and blessings be upon him) said: Surely the sun and the moon are two signs among the signs of Allah Almighty; He frightens His servants through them. So when you see this, then perform a prayer similar to the obligatory prayer you have just performed.