Hadith 82

Bulugh al-Maram

Book 2: The Book of Prayer
وَعَنْ أَبِي سَعِيدٍ ‏- رضى الله عنه ‏- قَالَ : قَالَ رَسُولُ اَللَّهِ ‏- صلى الله عليه وسلم ‏-{ إِذَا جَاءَ أَحَدُكُمْ اَلْمَسْجِدَ , فَلْيَنْظُرْ, فَإِنْ رَأَى فِي نَعْلَيْهِ أَذًى أَوْ قَذَرًا فَلْيَمْسَحْهُ , وَلْيُصَلِّ فِيهِمَا } أَخْرَجَهُ أَبُو دَاوُدَ , وَصَحَّحَهُ اِبْنُ خُزَيْمَةَ 1‏
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)].