- If a person realizes, while in the middle of the prayer, that he is carrying some impurity, he must remove it, continue the prayer, and build upon what he had already performed; the prayer remains sound. This is established by the authentic report that the Prophet ﷺ was once praying when, part-way through, he removed his sandals and placed them to his left. The congregation, seeing him do so, took off their sandals as well. When he had finished, he asked, “What made you cast off your sandals?” They replied, “We saw you remove yours, so we removed ours.” The Messenger of Allah ﷺ said, “Gabriel came to me and informed me that there was filth on them”—or, in another wording, “some dirt,” and in yet another, “impurity”—“so I removed them. When any one of you comes to the mosque, let him inspect his sandals; if he sees on them any filth”—or, “dirt,” or, “impurity”—“let him wipe it off and then pray in them.”
This is part of the hadith of Abū Saʿīd al-Khudrī, who said, “The Messenger of Allah ﷺ led us in prayer one day …” and so on.
It was recorded by Abū Dāwūd, al-Dārimī, al-Hākim, al-Bayhaqī, likewise by al-Ṭaḥāwī in Sharḥ al-Maʿānī, by al-Ṭayālisī, and by Aḥmad—whose wording is cited here. The alternative version in the two places is also narrated by him and by others. All of them transmit it from Ḥammād ibn Salama, except Abū Dāwūd, who reports it from Ḥammād ibn Zayd; both chains go through Abū Naʿāma al-Saʿdī, from Abū Naḍra, from Abū Saʿīd.
Al-Hākim said, “Authentic according to Muslim’s criterion,” a judgment endorsed by al-Dhahabī and Ibn al-Wazīr in al-Rawḍ al-Bāsim. Their assessment is correct, and al-Nawawī likewise declared it sound in al-Majmūʿ.