عن أبي موسى الأشعري رضي الله عنه قال: خَسَفَت الشمس على زمان رسول الله صلى الله عليه وسلم . فقام فَزِعًا، ويخشى أن تكون الساعة، حتى أتى المسجد، فقام، فصلى بأطول قيام وسجود، ما رأيته يفعله في صلاته قطُّ، ثم قال: إن هذه الآيات التي يُرْسِلُهَا الله عز وجل : لا تكون لموت أحد ولا لحياته، ولكن الله يُرْسِلُهَا يُخَوِّفُ بها عباده، فإذا رأيتم منها شيئا فَافْزَعُوا إلى ذكر الله و دُعَائِهِ وَاسْتِغْفَارِهِ.
[صحيح] - [متفق عليه]
Abu Mūsa al-Ash‘ari (may Allah be pleased with him) reported: The sun eclipsed during the time of the Messenger of Allah (may Allah's peace and blessings be upon him). He stood in great anxiety fearing that it might be the Doomsday, till he came to the mosque. He stood up to pray with prolonged standing and prostration such as I never saw him doing in prayer; and then he said: "These are the signs which Allah sends, not on account of the death of anyone or life of any one, but Allah sends them to frighten His servants thereby. So when you see any such thing, hasten to remember Him, supplicate Him, and beg pardon from Him."
Sahih/Authentic. - [Al-Bukhari and Muslim]
When the sunlight vanished, or partially disappeared, during the Prophet's lifetime, he stood up in panic, as his complete knowledge of his Lord made him constantly fearful and watchful, given the misguidance and transgression of most people on earth or the possible imminence of Doomsday. So, he entered the mosque and led people in the Eclipse Prayer, prolonging the standing and prostration in a way not seen before, a sign of repentance and pursuit of forgiveness from Allah, the Almighty. Having finished his earnest supplication, the Prophet turned to people, exhorting them and explaining that Allah sends these signs to His servants as a lesson, a reminder, and a means of intimidation, so that they may hasten to remember their Lord, invoke Him, and engage in prayer.