He would also, on occasion, remove his sandals while actually engaged in prayer and then carry on praying, as Abu Saʿid al-Khudri relates: “The Messenger of Allah ﷺ once led us in prayer. During the course of the prayer he took off his sandals and placed them to his left, so when the people saw that they removed their sandals as well. When he concluded the prayer he asked, ‘What made you cast off your sandals?’ They replied, ‘We saw you cast off yours, so we did the same.’ He said, ‘Gabriel came to me and informed me that they contained filth—or, he said, impurity (in another narration: something unclean)—so I took them off. Therefore, when any one of you comes to the mosque, let him inspect his sandals; if he finds in them any filth—or, he said, impurity (in the other narration: something unclean)—let him wipe it off and pray in them.’ (1)
—“When any one of you begins the prayer, let him either keep his sandals on or remove them.”
This wording shows that the matter is left to personal choice, yet it does not contradict the ruling of recommendation, just as in the hadith: “Between every two calls to prayer there is a supererogatory prayer for whoever wishes.” Al-Shawkani comments, “This is the most equitable and, in my view, the strongest position.” Al-Hafiz Ibn Hajar adopts the same view in Fath (1/393); after citing the hadith he writes, “Its recommended status stems from the aim of differing from them that has just been mentioned.”
(1) Reported by Abu Dawud, Ibn Khuzaymah, and al-Hakim, who declared it sahih—a judgment endorsed by al-Dhahabi and al-Nawawi. It is also listed in Irwa al-Ghalil, no. 284, and in Sahih Sunan Abi Dawud, no. 657.
(*) The detailed documentation of this hadith occurs on a page missing from the Shaykh’s original manuscript; the abbreviated reference reproduced here is taken from the printed edition of Sifat al-Salat.