Question :
A question was asked about the ruling regarding praying in a mosque that contains a grave.
Fatwa in Brief: Mosques that have graves are not
to be prayed in; and doing so is illegal.
Shaykh Ibn Baz, Majmu‘ Fatawa wa Maqalat,
5/388-389
Response:
If the purpose for praying to the grave is to honor it
then it is illegal and not valid, regardless of the
position of the grave. But if this is not the purpose
then it is makruha, while valid if the grave is in front
of the person praying, otherwise it is not even makruh.
Commentary:
In the hadith collections of Bukhari and Muslim,
the Prophet (upon him be peace) is reported to have
said: “God fought the Jews, those who used the graves of
their Prophets as mosques”. There is another hadith
in Muslim in which, five days before his death, the
Prophet (upon him be peace) said: “Beware of those who
preceded you; for they used to take the graves of their
Prophets and righteous men as places of worship. You
must not take graves as mosques, I forbid you to do
that”. [From the six Canonical hadith
collections] All except al-Bukhari and Ibn Majah include
hadiths in which the Prophet (upon him be peace)
says: “Do not pray to graves and do not sit on them”.
Discussing these hadiths, some scholars said that
it is wrong to take graves as places of worship; while
it is not wrong to build the mosque first, and then the
grave later, so that the mosque attendant (waqif)
and others may be buried there. In response to this,
al-‘Iraqi observes: “that there is no difference here,
whether the mosque was built with or without the
intention that a part of it should be used as a burial
ground. Such an action [burying someone within a mosque]
is prohibited. There can be no bargaining as to whether
this is permitted, it goes against the fundamental
nature of the mosque itself”.
While burying a person in a mosque is prohibited
according to some scholars [such as al-‘Iraqi], it is
only disliked (makruh) according to others. There
is also disagreement as to whether or not the location
of the grave is important; [that is to say, it may be
more disliked] if it is positioned in front of the
praying place, behind it, on its right or left. Some say
it is disliked if the grave is in front. This is because
what lies in front of the worshipper signifies the
direction of prayer; in this sense, the grave takes the
place of the mosque [as the main vehicle of one’s
prayers]. However, if the grave is positioned behind, or
to the right or left of the worshipper there is no harm
in this.
The three Imams believe that the prayer of someone near
a grave is valid and is not [even] legally disliked. In
contrast, however, if the grave positioned in front of
place of prayer, they consider prayer in such a place to
be disliked. One’s prayers, nevertheless, remain valid.
According to Imam Ahmad ibn Hanbal, however, praying
near a graveyard is forbidden (haram), which
means that one’s prayers are rendered invalid. This
disagreement only concerns the graves that are located
within a mosque. However, if the graves are kept
separate from the mosque, and people pray in the mosque
and not at the gravesite itself, there is no
disagreement between the scholars that this act is
permitted, and not even disliked.
[At the same time,] If the purpose of the prayer in the
direction of the grave is to honor it [the grave], then
[there is no disagreement] this is haram. One’s
prayers, in this instance, are invalid regardless of the
position of the grave. However, if there is no intention
to honour the grave, then this practice is merely
disliked. Thus, the Muslim’s prayers remain valid.
Dr. Ahmad ‘Id