Hadith 170

وعن أبي سعيد رضي الله عنه قال : قال رسول الله صلى الله عليه وآله وسلم : « إذا جاء أحدكم المسجد فلينظر فإن رأى في نعليه أذى أو قذرا فليمسحه وليصل فيهما ». أخرجه أبو داود . وصححه ابن خزيمة.
Narrated Abu Sa'id (RA): Allah's Messenger (ﷺ) said: "When any of you comes to the mosque he should look and if he sees impurity on his sandals (shoes) he should wipe them and then pray in them." [Reported by Abu Dawud, and Ibn Khuzaimah graded it Sahih (authentic)].
Hadith Reference بلوغ المرام / 170
Hadith Grading محدثین: صحيح
Hadith Takhrij «أخرجه أبوداود، الصلاة، باب الصلاة في النعل، حديث:650، وابن خزيمة، حديث:1017، وابن حبان(الموارد)، حديث:360، والحاكم:1 /260 وصححه علي شرط مسلم، ووافقه الذهبي.»
Explanation & Benefits
Shaykh Safi ur-Rahman Mubarakpuri
Lexical Explanation:
«أَذًي»: A nature from which pain or discomfort is felt.
«قَذَرًا»: Natures that consider something filthy and detest it. What is meant by this is impurity and filth.
«أَذًي أَوْ قَذَرًا»: The narrator has expressed doubt as to whether the Prophet sallallahu alayhi wa sallam used the word «أَذًي» or «قَذَرًا». Both have the same meaning, i.e., impurity.

Benefits and Issues:
➊ This hadith is clear evidence that it is permissible to pray while wearing shoes, provided that the shoes are clean and pure.
➋ If impurity is stuck to the shoe, rubbing it off will make the shoe clean and pure.
➌ The apparent wording of the hadith indicates that the ruling is the same whether the impurity is dry or wet.
➍ The reason for this prophetic instruction is that once the Prophet sallallahu alayhi wa sallam performed prayer while wearing shoes. He was not aware that the shoes were impure and that there was filth and impurity stuck to their underside. During the prayer, Jibril (Gabriel) alayhis salam informed him that his shoes were contaminated with impurity. He removed his shoes during the prayer and continued the prayer. The followers (muqtadis) also removed their shoes in imitation of the Prophet’s action and continued praying. After completing the prayer, the Prophet asked the companions why they had removed their shoes. They replied that they had done so in following him, and then the Prophet sallallahu alayhi wa sallam explained the reason for removing his shoes. [مسند أحمد 203، و سنن أبى داود، الصلاة، باب الصلاة فى النعل، حديث : 650]
➎ From this hadith, it is understood that if a person praying does not know at the beginning of the prayer that there is impurity on his clothes or shoes, and he comes to know of it during the prayer, then if he removes the impure thing in that state and completes the prayer, the prayer will be completely valid.
Source: Bulugh al-Maram: Commentary by Safiur Rahman Mubarakpuri, Page: 170