Abu Saeed Khudri reported,

While the Messenger of Allah ﷺ was leading his companions in prayer, he removed his sandals and placed them to his left. When the people saw this, they took off their sandals as well. When the Messenger of Allah ﷺ finished the prayer, he asked, "What made you take off your sandals?"They replied, "We saw you take off your sandals, so we took off ours."The Messenger of Allah ﷺ said, "Jibreel ﷺ came to me and informed me that there was filth," or he said, "something harmful on them." Then he said, "When one of you comes to the mosque, let him check his sandals. If he finds filth or something harmful on them, let him wipe it off and pray in them."

Abu Dawud 650

Sahih

حدثنا موسى بن إسمعيل حدثنا حماد بن سلمة عن أبي نعامة السعدي عن أبي نضرة

عن أبي سعيد الخدري قال

بينما رسول الله ﷺ يصلي بأصحابه إذ خلع نعليه فوضعهما عن يساره فلما رأى ذلك القوم ألقوا نعالهم فلما قضى رسول الله ﷺ صلاته قال ما حملكم على إلقاء نعالكم قالوا رأيناك ألقيت نعليك فألقينا نعالنا فقال رسول الله ﷺ إن جبريل ﷺ أتاني فأخبرني أن فيهما قذرا أو قال أذى وقال إذا جاء أحدكم إلى المسجد فلينظر فإن رأى في نعليه قذرا أو أذى فليمسحه وليصل فيهما

أبو داود 650صحيح
Contents
Reference
Commentary
Ayat
Collection
Sunan Abu Dawud
Book
Prayer
Chapter
Prayer in sandals
Numbering
Darussalam 650
Abu Dawud 650