Verily the sun and the moon are the two signs among the signs of Allah by which He frightens his servants and they do not eclipse on account of the death of any one of the people. So when you see anything about them, observe prayer, supplicate Allah till it is cleared from you.
The Book of Prayer - Eclipses
Sahih Muslim 911 a
Exposition of the Hadith
This noble hadith establishes that solar and lunar eclipses are among the great signs of Allah's power, serving as divine warnings to awaken His servants from negligence and remind them of the Hereafter. They are not natural phenomena occurring due to anyone's death, as was falsely believed in pre-Islamic ignorance.
When witnessing these celestial events, the prescribed response is to turn to Allah through prayer and supplication, demonstrating complete dependence on the Creator rather than the creation. The eclipse prayer is a collective act of worship wherein Muslims gather in mosques, humbling themselves before Allah and seeking His protection from punishment.
The instruction to continue praying and supplicating until the eclipse clears teaches persistence in devotion and reinforces that only Allah controls the cosmic order. This practice transforms a natural phenomenon into an opportunity for spiritual renewal and increased God-consciousness.
Legal Rulings Derived
Eclipse prayers are confirmed Sunnah (Sunnah Mu'akkadah) performed in congregation at the mosque.
The prayer consists of two rak'ahs with prolonged standing, bowing, and prostrations, following the Prophet's example.
During the eclipse, Muslims should engage in dhikr (remembrance of Allah), du'a (supplication), and seeking forgiveness until the phenomenon concludes.
It is recommended to give charity and free slaves (in applicable contexts) as acts of seeking Allah's pleasure during this time.