By Shaykh Yūsuf Badāt
Is it farḍ (mandatory) to offer the lunar eclipse prayer?
In the Name of God, Most Merciful, Most Kind
Jazak Allāh Khayr/ Thank you for your question.
Offering prayer (ṣalāh) during a lunar eclipse is an emphasized prophetic practice (sunnah muʾakkadah) in the view of the Shāfīʾe and Ḥanbalī school. It is a recommended practice (mandūb) according to the Mālikī school. The Ḥanafī jurists are of the view that this prayer is praiseworthy (ḥasan). No Islamic jurist has made the lunar eclipse prayer mandatory (farḍ al-aiyn).
The lunar eclipse prayer can be offered individually in one’s home, as preferred by the Mālikī and Ḥanafī Fiqh [due to nightfall and its dangers]. This prayer can also be performed in congregation at the masjid as stipulated and preferred by the Shāfīʾe and Ḥanbalī schools of jurisprudence [basing it on the solar eclipse prayer].
(See: Al-Mawsūʾah Al-Fiqhīyyah, Kitāb Fiqh ʿAlā Al-Madhāhib Al-Arbaʿah, Al-Muḥīṭ Al-Burhānī, Iʿilā Al-Sunan)
“Whenever you see these eclipses pray and invoke (Allāh) until the eclipse is over.” (Bukhārī)
And Allāh Knows Best