حَدَّثَنَا مُوسَى بْنُ إِسْمَاعِيلَ، حَدَّثَنَا حَمَّادُ بْنُ زَيْدٍ، عَنْ أَبِي نَعَامَةَ السَّعْدِيِّ، عَنْ أَبِي نَضْرَةَ، عَنْ أَبِي سَعِيدٍ الْخُدْرِيِّ، قَالَ بَيْنَمَا رَسُولُ اللَّهِ صلى الله عليه وسلم يُصَلِّي بِأَصْحَابِهِ إِذْ خَلَعَ نَعْلَيْهِ فَوَضَعَهُمَا عَنْ يَسَارِهِ فَلَمَّا رَأَى ذَلِكَ الْقَوْمُ أَلْقَوْا نِعَالَهُمْ فَلَمَّا قَضَى رَسُولُ اللَّهِ صلى الله عليه وسلم صَلاَتَهُ قَالَ ‏"‏ مَا حَمَلَكُمْ عَلَى إِلْقَائِكُمْ نِعَالَكُمْ ‏"‏ ‏.‏ قَالُوا رَأَيْنَاكَ أَلْقَيْتَ نَعْلَيْكَ فَأَلْقَيْنَا نِعَالَنَا ‏.‏ فَقَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم ‏"‏ إِنَّ جِبْرِيلَ صلى الله عليه وسلم أَتَانِي فَأَخْبَرَنِي أَنَّ فِيهِمَا قَذَرًا ‏"‏ ‏.‏ وَقَالَ ‏"‏إِذَا جَاءَ أَحَدُكُمْ إِلَى الْمَسْجِدِ فَلْيَنْظُرْ فَإِنْ رَأَى فِي نَعْلَيْهِ قَذَرًا أَوْ أَذًى فَلْيَمْسَحْهُ وَلْيُصَلِّ فِيهِمَا ‏"‏ ‏.‏
Translation
Narrated AbuSa'id al-Khudri

While the Messenger of Allah (ﷺ) was leading his Companions in prayer, he took off his sandals and laid them on his left side. When the people saw that, they threw down their sandals. When the Messenger of Allah (ﷺ) finished his prayer, he said: "What made you throw down your sandals?" They said: "We saw you throw down your sandals, so we threw down our sandals." The Messenger of Allah (ﷺ) said: "Verily, Gabriel (ﷺ) came to me and informed me that there was filth in them." And he said: "When any of you comes to the mosque, let him look, and if he sees filth or harm on his sandals, let him wipe them and pray in them."