Praying in mosques that have graves...

Egypt's Dar Al-Ifta

Praying in mosques that have graves in them: is it permissible?


Is it permissible to pray on graves? What is the ruling of praying in mosques that have graves in them? Is this considered taking graves as mosques?


In Islamic jurisprudence, the issue of mosques that have graves in them is a far’ [a new case]. It has been used in the worst of ways by the ignorant and those who wish to sew discord, accusing others of worshipping graves, innovation and idolatry. Confusion between certain matters has caused misunderstanding when dealing with this question and so we will clarify these and differentiate between them.

Praying over a grave is not the same as praying in a mosque that has a grave in it, and this does not turn a grave into a mosque. We will therefore differentiate between three things:
1) Praying on graves.
2) Praying in mosques that have graves in them.
3) Using graves as places for offering prayers (mosques).

Praying on graves
A grave is the place where a person is buried. Graves are respected in Islamic law as a way of honoring the dead. For this reason, jurists have agreed that it is disliked to walk on graves because it was reported that the Prophet (peace and blessings be upon him) forbade this. According to the Malikis, this ordinance is specific to graves with raised mounds, and the Shafi'is and Hanbalis made exceptions from the dislike due to it being a need or the only way to reach another grave.

The Hanafis are of the view that it is disliked to pray in cemeteries and this was also the position of Al-Thawri and Al-Awza'i. This is because a cemetery is likely to be filthy and because it is similar to [the actions of] the Jews. However there is no harm in praying in a place in a cemetery which has been reserved for prayer and which is free of graves or filth.

The Malikis maintained the permissibility of praying in cemeteries regardless of whether they are used or not, they are open or not, or belong to Muslims or polytheists.

The Shafi'is went into detail saying that it is agreed within the school that prayers performed in cemeteries that are exposed are invalid because the earth has mixed with the remains of the dead. This ruling applies only if the person praying does not put something under him to pray on in which case, it is disliked. If, however, it is certain that it is not exposed, then the prayer is valid without disagreement since the place where it is performed is pure, though it is lightly disliked because it is a place where filth is buried. If there is doubt concerning it being exposed, there are two positions. The most correct position is that the prayer is valid but disliked because, since earth is pure, one cannot rule that it is filth due to doubt. The opposite position, that the prayer is invalid, is based on doubt about the fulfillment of [the obligatory] prayer; that which is obligatory is not removed by doubt.

The Hanbalis maintained that a prayer performed in a cemetery is not valid regardless of whether it is old or new or it is exposed or not though there is nothing to prevent one from praying in a place where there is one or two graves because such a place cannot be called a cemetery. According to them, a cemetery is a place where there are three graves or more graves. They unequivocally said that it is not forbidden to pray in a house where someone is buried even if it contains more than three graves because it is not a cemetery.

Praying in a mosque that has a grave in it
Praying in a mosque that houses the grave of a prophet or a righteous person is valid and sanctioned in Islamic law and may even be recommended. Evidence supporting this ruling is found in the Quran, the Prophetic Sunnah, the actions of the Companions and the practical consensus of the community.

The Quran
The Quran says: “Build over them a building; their Lord knows best concerning them. Those who won their point said, ‘We verily shall build a place of worship over them’ “ [18:21]. This verse is from the story of the Companions of the cave who slept therein for long time, yet thought that they had been there for only a short period. The first statement of the verse was made by the polytheists while the second was made by the monotheists. The verse expresses both statements without censure; if there had been something blameworthy in them, it would have been indicated in some manner. That the verse acknowledges both statements, is evidence of their permissibility. In fact, the Quran presents the words of the monotheists in a favorable light compared to that of the polytheists which is enveloped in misgivings. The monotheists firm decision to build a place of worship and not merely any structure, sprang from their faith. This indicates that they knew God and acknowledged worship and prayer. In his commentary on the words “We verily shall build a place of worship over them”, Al-Razi said: "In which to worship God and preserve the remnants of the people of the cave.” Al-Shawkani said: "The mention of building a mosque suggests that “Those who won their point” were Muslims.

The Sunnah
- 'Abd Al-Razaq narrated through Ma'mar through Muhammad Ibn Muslim Ibn Shihab Al-Zuhri through Al-Muwawir Ibn Makhramah and Marwan Ibn Al-Hakam who said: "Abu Basir escaped from the polytheists after the treaty of Hudaybiyyah. He went to Sayf Al-Bahr and Abu Jandal Ibn Suhayl Ibn 'Amr joined him, having escaped from the polytheists as well. They were later joined by others whose number reached three hundred. Abu Basir would lead them in prayer and say: "God Most High is the Greatest, whoever defends God is defended by Him." When Abu Jandal joined them, he would lead the prayers. Whenever, they heard about any passing trade caravan of the Quraysh, they would attack it. So the people of Quraysh sent a message to the Prophet (peace and blessings be upon him), beseeching him to hand Abu Basir and his companions over to them. The Prophet (peace and blessings be upon him) wrote to Abu Jandal and Abu Basir telling them and those who were with them to return to their homes and families. The Prophet's letter was brought to Abu Jandal when Abu Basir was on his death-bed. He died with the Prophet's letter in his hand as he was reading it. Abu Jandal buried him in that very place and built a mosque over his grave."

- The position of the Prophet’s Companions on this matter was evident from the differences that arose between them during the Prophet’s burial. Imam Malik said: "Some held that he should be buried by the pulpit [where he used to deliver sermons] and argued said that he should be buried in the Baqi'. Abu Bakr said: ‘I heard the Messenger of God say, 'No Prophet was ever buried except in the place where he died.' So dig a hole for him there.’" The point of evidence here is that the Prophet’s Companions suggested that he be buried by the pulpit which is, with all certainty, inside the mosque, and nobody rebuked them for this suggestion. Abu Bakr’s objection was not due to the fact that it would have been impermissible to bury him inside the mosque. He merely wished to adhere to the Prophet’s command of being buried in the place where he died.

- The Prophet (peace and blessings be upon him) died in Aisha's room which was attached to the mosque where the Muslims prayed. So the situation of the room in relation to the mosque was pretty much the same as the situation of mosques that are connected to rooms in which saints are buried in our times wherein the tomb is connected to the mosque and people pray in the main prayer area of the mosque outside.

Those who object to this, maintain that this was particular to the Prophet (peace and blessings be upon him). The response to this is that the particularities of rulings related to the Prophet (peace and blessings be upon him) requires evidence, and the basis is that rulings remain general as long as there is no evidence to restrict them. If we accept the position of those who maintain that this is only specific to the Prophet (which we have already shown that it is not), the answer would be that Abu Bakr and Umar were both buried in this room, and the room is connected to the mosque. The Companions prayed in the mosque connected to this room that housed three graves, and Aisha lived in the room and prayed her obligatory and supererogatory prayers in it. Is this not to be considered the actions and practical consensus of the Companions?

Turning a grave into a mosque
This is not the same as a mosque that has a grave in it. The Prophet (peace and blessings be upon him) did not forbid the construction of mosques in the vicinity of graves whether or not the structures are connected or separated. Aisha related that the Prophet (peace and blessings be upon him) said: "God cursed the Jews and Christians [for] they took the graves of their prophets as places of worship." The version of the hadith recorded by Muslim includes the words, "the graves of their prophets and righteous." From this hadith, the scholars of the community deduced that the prohibition concerns turning the grave itself into a place for worship by prostrating on it to the person buried in it as the Jews and Christians did. The Quran says: “They have taken as lords beside God their rabbis and their monks and the Messiah son of Mary, when they were bidden to worship only One God. There is no God save Him. Be He Glorified from all that they ascribe as partner (unto Him)!” [9: 31].

Muslims need to understand what exactly is forbidden and not look at what Muslim have done in their mosques and claim that the hadith refers to Muslims. This is what the Khawarij did, may God protect us. Ibn 'Umar said: "They took verses [of the Quran] that were revealed in reference to polytheists, and applied them to Muslims."

That the scholars understood the meaning [of these hadiths] with great insight, is manifest in their commentaries. Shaykh Al-Sindi said: “The hadith was meant as a warning to the community against emulating what the Jews and Christians did with the graves of their prophets, which was to turn them into places of worship either by prostrating to them, or praying in their direction. It has been said that the mere construction of a mosque in proximity to a righteous person, seeking blessings, is not forbidden."

Ibn Hajar Al-'Asqalani and other commentators on the books of the Sunnah, related the words of Al-Baydawi who said: "God cursed the Jews who prostrated over the graves of their prophets, and prayed in their direction, thereby making them idols. He forbade Muslims from doing the same. There is nothing blameworthy about building a mosque in the proximity of a righteous person or praying by his grave, seeking assistance from him and for some of the effects of his good deeds to reach him and not out of horning him or facing his grave [in prayer]. Do you not see that Ismail is buried in the mosque in Mecca? And that mosque is the best mosque in which one can choose to pray. And the prohibition of praying in graveyards refers to those that are uncovered due to the filth that lies therein."

Based on the above, prayers performed in mosques which contain graves is are valid if the grave is in a place where people do not pray separate from the mosque, and there is nothing impermissible or disliked about praying in the adjacent mosque. If, however, the grave is inside the mosque itself, the prayer is invalid and forbidden according to the school of Ahmed Ibn Hanbal, and permissible and valid according to the other three imams; all that they said is that it is disliked for a grave to be in front of the person praying due to the similarity between this and praying to it.
And God the Almighty knows best.

Share this:

Related Fatwas