It is narrated from Sayyiduna Abu Sa'id (may Allah be pleased with him) that the Prophet (peace and blessings be upon him) led the prayer wearing his sandals, and the people also prayed in their sandals. Then he (peace and blessings be upon him) took off his sandals, and the people also took off their sandals while still in the prayer. When he (peace and blessings be upon him) completed the prayer, he said: "What made you take off your sandals during the prayer?" They said: O Messenger of Allah! We saw you do (so), so we did the same. He (peace and blessings be upon him) said: "Jibril (peace be upon him) informed me that there was filth on them. When one of you comes to the mosque, he should look: if he sees filth on his sandals, he should take them off; otherwise he should pray in his sandals."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الصلاة / 4086
It is narrated from Sayyiduna Abu Sa'id al-Khudri (may Allah be pleased with him) that the Prophet (peace and blessings be upon him) led the prayer and took off his sandals, and the people also took off their sandals. When he (peace and blessings be upon him) finished, he asked: "Why did you take off your sandals?" They said: O Messenger of Allah! We saw that you took yours off, so we took ours off too. He (peace and blessings be upon him) said: "Jibril (peace be upon him) came to me and informed me that there was filth on the sandals. When one of you comes to the mosque, he should turn his sandals over and look for filth on them; if there is filth on them, he should rub them against the ground and then pray in them."
This hadith is known through Hammad bin Salamah, from Abu Na'amah Abd Rabbih al-Sa'di, from Abu Nadrah. It has also been narrated from al-Hajjaj bin al-Hajjaj, from Abu Amir al-Khazzaz, from Abu Na'amah, and that is not strong; and it has been narrated through another way, which is not preserved (ghayr mahfuz), from Ayyub al-Sakhtiyani, from Abu Nadrah.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الصلاة / 4087
Sayyiduna Abu Sa'id al-Khudri (may Allah be pleased with him) said: The Prophet (peace and blessings be upon him) led the prayer wearing his sandals, then he took them off. He (peace and blessings be upon him) was asked (about it), and he (peace and blessings be upon him) said: "Jibril came to me and informed me that there was filth on them. When you come to the mosque, look at your sandals; if anything is on them, clean it off."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الصلاة / 4088
Zayd bin Aslam (may Allah have mercy on him) said: I saw Abdullah bin Umar (may Allah be pleased with them both) praying in a blood-stained cloak. Nafi' (may Allah have mercy on him) came, removed the cloak from him and put his own cloak over him, and he continued in his prayer.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الصلاة / 4089
It is narrated from Salim (may Allah have mercy on him) that Ibn Umar (may Allah be pleased with them both) was praying when he saw blood on his clothes, so he left the prayer and gestured to them. They brought water, he washed the garment, and he completed the rest of the prayer, and he did not repeat the prayer.
Al-Shaykh said: This is the earlier view of Imam al-Shafi'i (may Allah have mercy on him), since he took as evidence the narrations of Abu Sa'id (may Allah be pleased with him) and Ibn Umar (may Allah be pleased with them both); but later he retracted it and said: He is to repeat the prayer, whether or not he knew beforehand of the (impurity) on his clothes, just as is the ruling for ablution (wudu).
Al-Shaykh (may Allah have mercy on him) said: This is the view of al-Hasan al-Basri and Abu Qilabah. Al-Shafi'i (may Allah have mercy on him) turned away from the hadith of Abu Sa'id because it is known through Hammad bin Salamah, from Abu Na'amah al-Sa'di, from Abu Nadrah, and the integrity of each of them is disputed; likewise al-Bukhari did not use any of them as evidence in the Sahih, and Muslim did not record it in his book, although he used them as evidence in other narrations. It is also possible that he turned away from it because he took Jibril's (peace be upon him) informing him of that as the beginning of a ruling, or because he understood the filth (adha) mentioned in it as something pure that is merely found repulsive. And Allah knows best. This hadith has been narrated from Bakr bin Abdullah al-Muzani from the Prophet (peace and blessings be upon him) as mursal, and as connected from the hadith of Ibn Mas'ud, Ibn Abbas and Abu Hurayrah. However, the hadith of Ibn Mas'ud is narrated only by Abu Hamzah al-Ra'i, from Ibrahim, from Alqamah, from Abdullah, and Abu Hamzah is not used as evidence, and it has been narrated through another way weaker than it; the hadith of Ibn Abbas is narrated only by Furat bin al-Sa'ib, from Maymun bin Mihran, from Ibn Abbas, and Furat bin al-Sa'ib was abandoned by them; and the hadith of Abu Hurayrah is narrated only by Abbad bin Kathir, and Abbad is not used as evidence. However, it has been narrated from Anas bin Malik with a chain in which there is no harm.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الصلاة / 4090
Hadith Gradingمحدثین:صحيح
Hadith Takhrij«صحيح۔ (بخاري، معلّق) باب من لم ير الوضوء الامن المخرصين من القبل والدبر»
It is narrated from Anas bin Malik (may Allah be pleased with him) that the Prophet (peace and blessings be upon him) never took off his sandals during the prayer except once, and the people also took off their sandals. He (peace and blessings be upon him) asked: "Why did you take them off?" They said: You (peace and blessings be upon him) took off your sandals, so we took ours off too. He (peace and blessings be upon him) said: "Jibril (peace be upon him) informed me that there was filth on them."
Only Abdullah bin al-Muthanna narrated it, and Allah knows best.
As for Ibn Umar (may Allah be pleased with them both), he would build upon the prayer already performed in this case (blood on the garment) and in the case of a nosebleed; while al-Miswar bin Makhramah used to say that he should start the prayer afresh, and that is the analogy with ablution (wudu) in this issue.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الصلاة / 4091