Sunan Abi Dawud, Hadith 650

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; so when the people saw this, they removed their sandals. When the Messenger of Allah finished his prayer, he asked: What made you remove your sandals? The replied: We saw you remove your sandals, so we removed our sandals. The Messenger of Allah then said: Gabriel came to me and informed me that there was filth in them. When any of you comes to the mosque, he should see; if he finds filth on his sandals, he should wipe it off and pray in them.

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

sunnah.com