An eclipse, then, is a wake-up call and a cause for apprehension, meant to make people return to Allah and remain conscious of Him.
In the Age of Ignorance they believed that an eclipse occurred only at the birth or death of a great person. The Messenger of Allah, peace and blessings be upon him, annulled that notion and explained the divine wisdom behind eclipses:
Al-Bukhari and Muslim relate from Ibn Masʿūd al-Anṣārī that the sun was eclipsed on the day Ibrāhīm—the Prophet’s son—died. The people said, “The sun has been eclipsed because of Ibrāhīm’s death.” The Messenger of Allah replied, “The sun and the moon are two of Allah’s signs; they do not eclipse because of anyone’s death or life. When you see that, hasten to the remembrance of Allah and to prayer.”
Another wording in the two Ṣaḥīḥs reads: “So supplicate to Allah and pray until it clears.”
And in Ṣaḥīḥ al-Bukhārī, Abū Mūsā narrates: “These signs that Allah sends are not on account of anyone’s death or life; rather, Allah frightens His servants with them. When you witness any of that, hurry to the remembrance of Allah, to His supplication, and to seeking His forgiveness.”
Thus Allah, exalted is He, causes these two tremendous signs—the sun and the moon—to experience eclipse and obscuration so that His servants may take heed and realize that they are created entities subject to deficiency and change like everything else He has made, thereby demonstrating to His servants His perfect power