Question:
What do the scholars say about a mosque in which there are one or more graves? Is it permissible to pray in it? Is there any difference whether the grave is in front of the worshipper, behind him, or beside him? Please issue a fatwa in the light of the Book and the Sunnah, the consensus of the Ummah, and reliable jurisprudential evidences.
Answer:
الحمد لله، والصلاة والسلام علىٰ رسول الله، أما بعد!
The fatwa of the Messenger of Allah ﷺ:
First we mention the fatwa of the Imam of the muftis, Muhammad ﷺ, and then we will present the fatwas of the four Imams.
Ibn Abi Shaybah (2/83) and Imam Malik (Muwatta 1/276) narrated from al-Harith al-Najrani that the Prophet ﷺ said five days before his death:
“Beware! Those who were before us used to take the graves of their prophets and righteous people as mosques. Beware! Do not take graves as mosques; I forbid you from this.”
This hadith is established with an authentic chain of narration and is narrated through various routes with more than fifteen chains.
This hadith is narrated from Aisha, Usama, Jundab, Abu Hurayra, Ibn Abbas, Abu Ubaydah ibn al-Jarrah, Zayd ibn Thabit, Ibn Masud, Ali ibn Abi Talib and the Mothers of the Believers (may Allah be pleased with them).
This hadith indicates the prohibition of building mosques over graves, and if a grave is brought into a mosque, it also falls within the scope of this prohibition.
The fatwas of the four Imams
1. The Hanafis:
Imam Muhammad (may Allah have mercy on him) said in Kitab al-Athar (45):
“We do not consider any further construction over the grave to be permissible, and we consider it disliked to build the grave with plaster or bricks, to coat it with plaster, and to build a mosque near it.”
Allama Ibn Malik (may Allah have mercy on him) says:
“Building a mosque over a grave is forbidden, because praying in it is following the practice of the Jews.”
Further fatwas in the books of Hanafi fiqh:
2. The Shafi’is:
Imam al-Shafi’i (may Allah have mercy on him) says:
“I dislike building a mosque over a grave, and likewise praying upon it, intending it, or facing it, because it carries the risk of trial and misguidance.”
Ibn Hajar al-Haytami (may Allah have mercy on him) says:
“Building mosques over graves is a major sin and a cause of shirk; it is not merely disliked but forbidden.”
3. The Malikis:
Imam al-Qurtubi (may Allah have mercy on him) says:
“Our scholars have said that it is forbidden for the Muslims to build mosques over the graves of prophets and scholars.”
4. The Hanbalis:
Imam Ibn al-Qayyim (may Allah have mercy on him) says:
“Like Masjid al-Dirar, every place in which Allah and His Messenger are disobeyed should be burned and demolished. A mosque built over a grave should also be demolished, and if a grave enters a mosque, the deceased should be removed from there. Imam Ahmad (may Allah have mercy on him) has stated this explicitly.”
Shaykh al-Islam Ibn Taymiyyah (may Allah have mercy on him) says:
“Praying in such mosques is without doubt forbidden and invalid; no prayer, whether obligatory or voluntary, is permitted in them.”
The matter of the blessed grave in the Prophet’s Mosque:
Some people argue that the blessed grave is present in the Prophet’s Mosque. Shaykh Ibn Uthaymin (may Allah have mercy on him) gave four answers to their doubt:
◄ The Prophet’s Mosque was not built over the grave; rather, it had already been built during the blessed life of the Prophet ﷺ.
◄ The Prophet ﷺ was not buried in the mosque; rather, he was buried in his room.
◄ In 94 AH the room was included in the mosque, and this was not done with the consultation of the Companions.
◄ The grave was enclosed with three walls and its angle was turned away from the direction of the qiblah, so that no one would pray facing the grave.
Conclusion:
◄ Building mosques over graves and praying in them is impermissible and forbidden.
◄ This act resembles the Jews, Christians and polytheists, which the Prophet ﷺ strictly forbade.
◄ According to the four Imams, praying in such a mosque is strongly disliked to the degree of prohibition (makruh tahrimi) or forbidden, and according to some jurists, such a prayer may even be invalid.
واللہ اعلم بالصواب