← Back to Blog
23 October 2026 islam hadith hanafi-fiqh mosque praying-in-shoes sunnah

Praying in Shoes, the Mosque Floor and Decorating Mosques: What the Sources Say

Did the Prophet ﷺ pray in shoes? What the first mosque's floor was like, why shoes come off on carpets today, and what Hanafi law says about decorating mosques with donations. Hadith, Qurtubi and al-Mabsut, every claim referenced.

Right under your nose. Film: The Golden Carpet (in Urdu) · Urdu version of this article · References at the end


A familiar scene

Any neighbourhood, after the Friday prayer. A man stands with a box: marble is coming for the mosque, a carpet, a chandelier, and “reward on every thread”. The same mosque’s roof leaks when it rains, the wudu taps drip, and two streets away a widow’s stove has not been lit today. No names and no particular mosque; most of us have seen this somewhere, and perhaps put something in the box.

The question is not what is in the collector’s heart; Allah knows that. The question is what is being asked for, and what our sources, the Quran, the hadith, the commentaries and Hanafi law, say about that request. This article is one reading of those sources.

What the first mosque was like

Abdullah ibn Umar reports that in the lifetime of the Messenger of Allah ﷺ the mosque was built of mud bricks, its roof of palm leaves and its pillars of palm trunks. Abu Bakr did not alter it. Umar expanded it on the same pattern, mud brick and palm leaves, changing the pillars to wood. Uthman expanded it greatly and built its walls of carved stone and lime, with pillars of carved stone and a roof of teak. (Bukhari 446; Abu Dawud 451)

Abu Sa’id al-Khudri tells what that roof was like: “A cloud came and it rained till the roof started leaking … and I saw Allah’s Messenger (ﷺ) prostrating in water and mud and even I saw the mark of mud on his forehead.” (Bukhari 669)

Pebbles lay on the floor. The worshipper was told not to keep brushing them: “When one of you gets up to pray, he must not remove pebbles, for mercy is facing him”; if it must be done, once, to smooth them. (Abu Dawud 945, 946) And the Prophet ﷺ prostrated on a khumra, a small palm-leaf mat just large enough for the face and hands. (Bukhari 379, 381; Muslim 1504) That palm-leaf mat was kept in the mosque; he said to Aisha, “Get me the mat from the mosque.” (Muslim 689) So the mosque floor was this: earth, pebbles, and one small palm-leaf mat. Palm roof, palm pillars, palm mat; not a trace of a carpet.

Two cautions. Do not say the Prophet ﷺ refused a carpet offered for the mosque; no source records such a thing. And do not say the floor was “bare”; there were pebbles and there was a palm-leaf mat.

Do know, though, that coverings existed in the homes of Madinah, and that he prayed on them there. Anas reports that when prayer time came while the Prophet ﷺ was in their house, “he would order that the carpet underneath him be swept and sprayed with water, and then he would stand up for the prayer and we would line up behind him”. (Bukhari 6203; the Arabic word is bisat, a floor covering) Abu Sa’id al-Khudri came to him and “found him observing prayer on a mat and prostrating on that”. (Muslim 1505; a hasir, a palm-fibre mat) But fine rugs, anmat in Arabic (coloured coverings; the translators give carpets, cushions and bedding), were not common. When Jabir married, the Prophet ﷺ asked him, “Have you got carpets?” Jabir said, “Whence can we get carpets?” He said, “But you shall soon have carpets.” (Bukhari 3631; Muslim 5449; Abu Dawud 4145) The carpets came with prosperity, and he did not speak ill of their coming. Yet the mosque floor stayed what it was: earth, pebbles, a palm-leaf mat. What the sources say is simple: the mosque was plain, and it was the Prophet’s ﷺ mosque.

Remember also that when Uthman rebuilt the mosque, people talked too much about it; it was disputed in his own time. He answered not with his own authority but with the Prophet’s ﷺ words: “Whoever built a mosque, (intending Allah’s pleasure), Allah would build for him a similar place in Paradise.” (Bukhari 450) That hadith is about building, not adorning. Note too what he changed: the walls, the pillars and the roof (Bukhari 446; Abu Dawud 451). Neither report says a word about the floor. And a Companion’s act, however honoured, is not revelation; the religion was perfected in the Prophet’s ﷺ own lifetime: “This day I have perfected for you your religion” (5:3).

Building, extending and repairing a mosque is reward. Nothing in this article says otherwise.

Praying in shoes

Sa’id ibn Yazid asked Anas ibn Malik whether the Prophet ﷺ had ever prayed with his shoes on. He replied: “Yes.” (Bukhari 386) Abdullah ibn Amr said: “I saw the Messenger of Allah (ﷺ) praying both barefooted and wearing sandals.” (Abu Dawud 653) Both ways are established from him.

Then the incident that is the key to the whole matter. Abu Sa’id al-Khudri reports that the Messenger of Allah ﷺ was leading the Companions in prayer when he took off his sandals and laid them on his left; seeing this, the people removed theirs. After the prayer he asked why. They said: we saw you remove yours. He told them that Gabriel had come and informed him there was filth on them, and then said: “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.” (Abu Dawud 650)

Notice: the instruction is not to take the shoes off but to look at them; and if there is filth, not to wash them but to wipe it off. A related hadith from Abu Hurairah: “When any one of you treads with his sandal upon an unclean place, the earth will render it purified.” (Abu Dawud 385; of leather socks, 386; the same from Aisha, 387) And Hudhaifa’s report of this community’s privilege: “the whole earth has been made a mosque for us, and its dust has been made a purifier for us in case water is not available.” (Muslim 1165; the same sense from Jabir, Bukhari 335 and 438)

There is one more hadith, and here are its words. Shaddad ibn Aws reports that the Messenger of Allah ﷺ said: “Act differently from the Jews, for they do not pray in their sandals or their shoes.” (Abu Dawud 652; the Arabic has ni’al and khifaf, sandals and leather socks)

Those are the words of the hadith. Now our own understanding, which is not part of it: this concerns the manner of worship, keep your own way; it is not a command of enmity towards any people. We stretch the hadith no further than that.

What do the commentators say? Under the verse of Surah Ta-Ha in which Musa is told “remove your sandals”, al-Qurtubi cites these same hadiths and writes that scholars did not differ that prayer in clean sandals, of hide from a lawfully slaughtered animal, is permitted, so much so that some scholars said that prayer in them is better (his words: «حتى لقد قال بعض العلماء: إن الصلاة فيهما أفضل»), reading it as the meaning of “take your adornment at every masjid” (7:31). (Qurtubi, vol. 11 p. 173) But the same Qurtubi, under 7:31 itself, notes that the report making prayer in sandals part of the “adornment” is attributed to Anas and is not authentic («ولم يصح», wa lam yasihh). (Qurtubi, vol. 7 p. 190) So we do not say “it is better”; we say only that some scholars held it better.

On Musa’s sandals, Qurtubi and Ibn Kathir record several explanations: that the sandals were of the hide of an unslaughtered donkey; that his feet should touch the soil of the blessed valley; that it was humility before his Lord. (Qurtubi vol. 11 p. 172; Ibn Kathir vol. 5 p. 275) The Hanafi principle, in al-Jassas, is that the laws of earlier prophets bind us unless abrogated (Ahkam al-Quran, vol. 4 p. 91); so Musa’s command is not simply waved away. Rather, the question of shoes is settled by this community’s own specific hadiths, the ones above.

In the same place Qurtubi quotes Ibrahim al-Nakha’i on those who take off their sandals: I wish a needy man would come and take them («لوددت أن محتاجا جاء فأخذها»). (vol. 11 p. 173) And a courtesy beside it: if you do take them off, put them between your feet, in Abu Hurairah’s words, and do not harm a Muslim with them («ولا تؤذ بهما مسلما»). Keep that sentence; it will matter below.

One more point, so that no one misreads this. Qurtubi also writes that if there is certain impurity on the shoe of the kind all agree is impure, such as blood or human excrement, then according to Malik, al-Shafi’i and most scholars only washing with water purifies it; for impurities on which scholars differ, there are two views on whether wiping with earth suffices. (vol. 11 pp. 173–174) “The earth purifies” is a mercy, not a blanket rule for every case; ask your scholar about your own.

What the carpet changed

Now the heart of it. On a floor of earth and pebbles, a grain of soil on your shoe was never a problem; the earth itself had been declared a purifier. The only thing to watch for was filth. When the carpet came in, every grain became a problem. The shoe stayed at the door, and with it the practice of one Sunnah stayed at the door too. Barefoot prayer is also Sunnah, so do not say the carpet abolished a Sunnah; say that of two Sunnahs, acting on one became impossible.

So should we walk into a carpeted mosque in our shoes today? No. And understand the reason, because the reason is usually got wrong. It is not that soil on a place of prostration is a problem; in the religion of one who prostrated in water and mud (Bukhari 669), a grain of earth is no fault. The reason is today’s custom. Taking shoes off on a carpet is so settled a practice that going against it would hurt people, start quarrels in the row, and break the very courtesy Abu Hurairah taught: do not harm a Muslim. So where a carpet is spread, take your shoes off, and know in your heart that you are doing it out of custom and consideration for people, not out of fear of soil.

Where, then, can the practice be revived? Where the ground itself suits it: the Eid ground, the open air, your own courtyard, and a new mosque whose courtyard is left as earth or pebbles. There, look at your shoe, wipe off any filth on the earth, and pray in them, exactly as the hadith says. (One thing said plainly: the narrations often heard about reviving a Sunnah, “the reward of a hundred martyrs” and the like, are graded weak, so we make no promise on them; a hadith of Sahih Muslim comes below that is enough.)

Building and adorning: what the law says

Building a mosque is reward (Bukhari 450). But the same Messenger ﷺ said: “I was not commanded to build high mosques”, and the narrator, Ibn Abbas, added: “You will certainly adorn them as the Jews and Christians did.” (Abu Dawud 448) And from Anas: “The Last Hour will not come until people vie with one another about mosques.” (Abu Dawud 449)

The same temper showed at the wall of his own house. Aisha hung a cloth over the door; when he returned from a journey he pulled it down and said: “God has not commanded us to clothe stones and clay.” The cloth was cut into two pillows, and he did not object. (Muslim 5519, 5520) Use is fine; dressing walls is not. That is the very distinction the law will draw below.

The care with which Hanafi law handles this is worth learning. Al-Sarakhsi, in al-Mabsut (vol. 30 pp. 282–284), writes that there is “no harm” (la ba’s) in decorating a mosque with plaster, teak and gold water. Then he reports his teacher’s view: that very phrase hints that there is no reward for it; “no harm” is said to lift blame, not to establish reward; it means it is enough for a man to come out of it “head for head”, breaking even. That, Sarakhsi says, is the position of the jurists, the madhhab; and the Zahiri scholars went further, disapproving of it and rebuking whoever did it. In the same passage he relates that Ali passed a decorated, ornamented mosque and said, whose churches are these? («لمن هذه البيع؟»); and that when al-Walid ibn Abd al-Malik sent forty thousand dinars to adorn the Prophet’s mosque and the money passed before Umar ibn Abd al-Aziz, he said: the poor need this money more than the pillars do («المساكين أحوج إلى هذا المال من الأساطين»).

Then Sarakhsi gives his own view, and fairness requires stating it. He holds to “no harm” because decoration draws a larger congregation and encourages people to sit in the mosque waiting for prayer; we are commanded to honour mosques, and in the hearts of some ordinary people that honour grows with adornment, so it may be said that by this route he is rewarded («فيمكن أن يقال بهذا الطريق يؤجر»). He cites a hadith that the believer is rewarded for spending on everything except building, with the addition “except mosques” in some narrations, and writes that if that addition is established, it proves reward for building and adorning a mosque. As for the reports condemning adornment, he reads them as aimed at adorning with money that is not pure, or with the intention of show and reputation.

After this come two rulings with no ambiguity. First: the best course is for a person to be content with what is needed and to send the surplus ahead for the Hereafter; here Sarakhsi quotes Abu Dharr’s cry, clinging to the covering of the Kaaba in the pilgrimage season, that a man who intends a journey prepares for it, so why do you not prepare for the journey of the Hereafter. Second: all this latitude is for one’s own lawful money. Whoever decorates with the mosque’s money is a sinner; the mosque’s money may be spent only on what falls under building. The teachers of the school said that the trustee may plaster a wall with the mosque’s money but may not carve ornament into the plaster with it, and if he does, he is liable, that is, he repays it from his own pocket. (al-Mabsut, vol. 30 p. 283)

So the honest summary is: decoration from your own pocket is lawful; in the madhhab’s settled view it earns no reward; in Sarakhsi’s own view it may; the better course is to stay below it; and decoration from the donation box is never lawful. Now set the box being passed round “for decoration” against that scale: for a thing the law ranks below the best course, a thing that may not be done even from the mosque’s own box, by what arithmetic is “a palace for every thread” promised?

The collector

Abu Humaid al-Sa’idi reports that the Prophet ﷺ sent a man to collect zakat. He came back and said: this is for you, and this was given to me as a present. The Prophet ﷺ said to him: “Why didn’t you stay at your father’s or mother’s house and see if you would be given presents or not?” Then he said the same from the pulpit, and added that whoever takes anything of it will carry it on his neck on the Day of Resurrection. (Bukhari 6636, 7197)

This hadith gives no verdict on intention. It gives a plain test: what came to you because of the office belongs to the office, not to you. That is why we do not judge any collector’s heart; we look only at the request and the accounts. And since Allah “is Good and He therefore, accepts only that which is good” (Muslim 2346), whoever gives for a mosque has the right to know where the money goes.

Need first, decoration later

One hadith in Sahih Muslim gathers this whole article into a single scene. Jarir reports that they were with the Prophet ﷺ when some people came, barefoot, half-naked, in striped woollen cloaks, swords hung round their necks, worn down by poverty; the Prophet’s face changed when he saw their state. He went in, came out, ordered Bilal to call the adhan, led the prayer, then preached and urged charity, “even if it is half a date”. A man of the Ansar brought a bag his hand could scarcely lift; then the people kept coming, until there were two heaps of food and clothing and the Prophet’s face shone like gold. Then he said: “He who sets a good precedent in Islam, there is a reward for him for this (act of goodness) and reward of that also who acted according to it subsequently, without any deduction from their rewards.” (Muslim 2351)

Look at what the “good precedent” was, the one that carried this promise: feeding the hungry. The reward was lying right there, in the mosque’s own courtyard, while we search the whole town for it: the leaking roof, the dripping taps, the sweeping of the courtyard, and the neighbour’s stove. The Quran describes those who maintain the mosques of Allah as people who believe, establish prayer, give zakat, “and do not fear except Allah” (9:18). Marble is not on that list.

So the next time a box comes round, ask three questions, without quarrelling with anyone:

  1. What is it for? Need or show? Roof, taps, cleaning and water, or carpet and chandelier?
  2. Who will hold the money? The trustee, with accounts, or one person’s pocket?
  3. Whose name does it want? If the work comes with a condition about a name, that condition is telling you something.

This article is a reading of the sources, not a fatwa. For your own mosque and your own case, ask a scholar you trust. And the same story, with the laughs, is our film The Golden Carpet, in which Jumma the barber of Khushhalpura opens a “Golden Carpet Fund” and ends by asking where his ten percent went when the reward turned out to be free. (Watch it here, or in Urdu.)

References

Numbering: Bukhari numbers follow the English translation used here (Krehl numbering). Abu Dawud and Muslim numbers follow the hadith-api edition (fawazahmed0), which numbers each collection in one running sequence, so printed editions may differ. Qurtubi, Ibn Kathir, Jassas and Sarakhsi are cited by the printed volume and page of the editions in the OpenITI corpus. Quran translation: Sahih International.

  • Quran: al-Ma’idah 5:3; al-A’raf 7:31; al-Tawbah 9:18; Ta-Ha 20:12
  • Sahih al-Bukhari 446 (the structure of the Prophet’s mosque); 669 (rain, prostration in water and mud); 379 and 381 (the khumra, a small palm-leaf mat); 6203 (the floor covering in Anas’s house); 3631 (Jabir: anmat); 450 (Uthman’s rebuilding; whoever builds a mosque for Allah); 386 (prayer in shoes); 335 and 438 (the earth a place of prayer); 6636 and 7197 (the zakat collector’s “present”)
  • Sunan Abi Dawud 451 (the Prophet’s mosque and the later rebuilding); 945 and 946 (pebbles); 656 (the khumra); 4145 (anmat); 653 (barefoot and in sandals); 650 (look at your sandals, wipe, pray in them); 652 (act differently from the Jews); 385, 386 and 387 (the earth purifies the sandal); 448 (not commanded to build mosques high); 449 (vying over mosques)
  • Sahih Muslim 689 (get me the khumra from the mosque); 1504 (the khumra, of palm leaves); 1505 (praying and prostrating on a mat); 5449 and 5450 (anmat); 5519 and 5520 (not commanded to clothe stones and clay); 1165 (the whole earth a mosque, its dust a purifier); 2346 (Allah is Good and accepts only what is good); 2351 (whoever sets a good precedent)
  • Al-Qurtubi, al-Jami’ li-Ahkam al-Quran: vol. 11 pp. 172–174 (Ta-Ha 20:12: Musa’s sandals; prayer in sandals; some held it better; Ibrahim al-Nakha’i; where to place the sandals; impurity and washing); vol. 7 p. 190 (al-A’raf 7:31: the sandals report is not authentic)
  • Ibn Kathir, Tafsir: vol. 5 p. 275 (Ta-Ha 20:12)
  • Al-Jassas, Ahkam al-Quran: vol. 4 p. 91 (earlier laws bind unless abrogated)
  • Al-Sarakhsi, al-Mabsut: vol. 30 pp. 282–284 (decorating the mosque; his teacher’s view; the sayings of Ali and Umar ibn Abd al-Aziz; Sarakhsi’s own view; the best course; decoration from mosque funds and the trustee’s liability)
  • Weak narrations, not relied on: Mishkat al-Masabih 168, 175, 176 (reward for reviving a Sunnah; graded weak in the Mishkat edition itself)
AI Q&A