In the lifetime of the Allah's Messenger (ﷺ) the sun eclipsed and he went out dragging his clothes till he reached the Mosque. The people gathered around him and he led them and offered two rak`at. When the sun (eclipse) cleared, he said, "The sun and the moon are two signs amongst the signs of Allah; they do not eclipse because of the death of someone, and so when an eclipse occurs, pray and invoke Allah till the eclipse is over." It happened that a son of the Prophet (ﷺ) called Ibrahim died on that day and the people were talking about that (saying that the eclipse was caused by his death).
Reference: Sahih al-Bukhari 1063 In-book : Book 16, Hadith 22 USC-MSA web (English) : Vol. 2, Book 18, Hadith 170 (deprecated)
Help us gift a modern, ad-free Islamic application for the Muslim Ummah. Your donation will be recorded as Sadaqah Jariyah in your book of deeds, In Sha Allah.