Praying in Masaajid that contain Graves, and the Grave of the Prophet (sallallaahu alaihi wa sallam) in the Masjid

Question: I am enquiring about the permissibility of performing prayer in a masjid in which there is a grave. Some scholars say that it is not permissible to perform prayer in it. They say that if there is no other masjid in your town, perform your Salah in your home, which is better for you in terms of reward than to pray in that masjid.  While others say it is permissible to perform prayer in it, because the grave of the Messenger (sallallaahu alaihi wa sallam) as well as the graves of his two Companions, Abu Bakr and Umar which are in his Masjid. I have no proof of either opinion. I sent this letter to you, to enquire about the truth, and the proof, because I live in the countryside in Senegal. We have one masjid in our town, in which there are four graves, three of which are attached to the outside wall of the Masjid in the direction of the Qiblah exactly. While the fourth is inside the Masjid?

Answer: First: It is not permissible to build masjid on graves, nor is it permissible to perform prayer in such a masjid  A'ishah, may Allaah be pleased with her, said: When the Prophet (sallallaahu alaihi wa sallam) was dying, he uncovered his face with a piece of cloth. Whenever he felt pain, he uncovered his face and said:  The curse of Allaah is upon Jews who turned the graves of their Prophets into praying place. He said that warning the Muslims against doing so. Had it not been for that, he would have ordered that his grave be raised above the ground, but he was afraid it would be turned into a masjid. [1] Jundub bin Abdullah said: I heard the Prophet (sallallaahu alaihi wa sallam) saying five days before he died:  I declare Allaah to have taken no friend from you, for Allaah has taken me for a beloved, as He took Ibrahim as a beloved. Were I to take a friend from my Ummah, I would have taken Abu Bakr for a friend. Beware! Those who were before you used to turn the graves of their Prophets and pious people into mosques. Beware! Never turn graves into mosques, for I forbid you doing so. [2] The Prophet (sallallaahu alaihi wa sallam) forbade building masjid on graves, and cursed those who do so. This signifies that building masjid on graves is a major sin. May Allaah protect us from it. That is why A'ishah, may Allaah be pleased with her, said in the above Hadith: warning the Muslims against doing so. Had it not been for that, he would have ordered that his grave be raised above ground, but he was afraid it would be turned into a masjid  Second: If a masjid is built on a grave or graves, then it must be demolished, because it is founded on other than what Allaah has legalised. Retaining such masjid and performing prayer in it is insisting in committing the sin of building it, and an excess in the religion in aggrandizing the one upon whose grave it was built. This would be conductive to Shirk. May Allaah protect us. Allaah, the Exalted said:  Do not go into extreme in your religion. [3] And the Prophet (sallallaahu alaihi wa sallam) said:  Beware of excess, the people before you were destroyed by excess. [4] But if a masjid is built with no grave in it, then later on, someone was buried in it, such mosque does not have to be demolished; rather, the grave should be dug out, and the corpse be taken out and buried in a graveyard with the Muslims. Burying people in a Masjid is an abominable deed which must be eliminated by removing the grave from the Masjid. Third: the Prophetic Masjid was founded by the Prophet (sallallaahu alaihi wa sallam) himself based upon piety and fear of Allaah, the Exalted, and with the pleasure of Allaah. The Prophet (sallallaahu alaihi wa sallam) was not buried in it after his death but was buried in A'ishah's apartment, may Allaah be pleased with her. When Abu Bakr died, he was buried next to him in that apartment. Then later on when Umar died, may Allaah be pleased with him, he was buried next to them in the same apartment. The apartment itself was not included in the Prophet's Masjid. It was enclosed in the Prophet's Masjid after the era of the Well-Guided Caliphs, may Allaah be pleased with them. Consequently, prayer in that Masjid is legal; rather one prayer in it is better than a thousand prayers in any other masjid  excluding the Sacred Masjid (Makkah) contrary to any other Masjid that was built in a grave or graves in which Salah is forbidden. Fourth: You should not pray the obligatory prayer at home; rather, you should perform along with Muslim bothers of yours, even in the open. You should also try to establish a Masjid on what Allaah has made legal to perform in it your five daily prayers in application of the Islamic laws, and in keeping away from what Allaah has forbidden. It is Allaah who grants success. May He exalt the mention of our Prophet, Muhammad, his household, and his Companions. 


[1] Al-Bukhari no. 1330, Muslim no. 529, An-Nasa'i no. 704, Ahmad 5:204 and Al-Muwatta no. 85 [2] Muslim no. 532 [3] An-Nisa 4:171 [4] Ahmad 1:347, Al-Hakim 1:466 and Ibn Majah no. 3029 

Permanent Committee for Research and Verdicts

Fatawa Islamiyah Vol. 1 Page 52