Praying in Mosques that contain Graves and the Grave of the Prophet SAW in the Masjid
Question:
I am inquiring about the permissibility of performing prayer in a mosque 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 mosque in your town, perform your Salah in your home, which is better for you in terms of reward than to pray in that mosque.
While others say it is permissible to perform prayer in it, because the grave of the Messenger as well as the graves of his two Companions, Abu Bakr and 'Umar are in his Masjid. I have no proof of either opinion. I sent this letter to you, to inquire about the truth, and the proof, because I live in the countryside in Senegal. We have one mosque 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 Qiblah exactly. While the fourth is inside the Masjid.
Answer:
First: It is not permissible to build mosques on graves, nor is it permissible to perform prayer in such a Masjid. 'A'ishah, may Allah be pleased with her, said: "When the Prophet was dying, he uncovered his face with a piece of cloth. Whenever he felt pain, he uncovered his face and said:
"The curse of Allah is upon Jews and Christians 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 ground, but he was afraid it would be turned into a Masjid." Jundub bin 'Abdullah said: I heard the Prophet SAW saying five days before he died:
"I declare before Allah to have taken no friend from you, for Allah 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.
The Prophet SAW forbade building mosques on graves, and cursed those who do so. This signifies that building mosques on graves is a major sin. May Allah protect us from it. That is why 'A'ishah, may Allah 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 mosque is built on a grave or graves, then it must be demolished, because it is founded on other than what Allah has legalized. 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 conducive to Shirk. May Allah protect us. Allah, the Exalted, said:
"Do not go into extreme in your religion".And the Prophet SAW said:
«Beware of excess, the people before you were destroyed by excess.
But if a mosque is built with no grave in it, then later on, some one 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 Masjid is abominable deed which must be eliminated by removing the grave from the Masjid.
Third: The Prophetic Masjid was founded by the Prophet himself based on piety and fear of Allah, the Exalted, and with the pleasure of Allah. The Prophet was not buried in it after his death but he was buried in 'A'ishah's apartment, may Allah be pleased with her. When Abu Bakr died, he was buried next to him in that apartment. Then later on when Umar died, may Allah 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 Allah be pleased with them.
Consequently, prayer in that Masjid is legal; rather, one prayer in it is better than a thousand prayer in any other Masjid, excluding the Sacred Mosque (Makkah) contrary to any other Masjid that was built on 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 brothers of yours, even in the open. You should also try to establish a Masjid on what Allah has made legal to perform in it your five daily prayers in application of the Islamic laws, and in keeping away from what Allah has forbidden. It is Allah who grants success. May He exalt the mention of our Prophet, Muhammad, his household, and his Companions.
Source:
Fatawa Islamiyah, Vol. 1 Pages 52-53-54