Building mosques over the graves of Prophets and righteous people, or over places connected to their lives, is something which the perfect sharee’ah of Islam came to forbid and warn against, and curses those who do that, because it is one of the means that lead to shirk and exaggeration about the Prophets and the righteous people....
See More It is not permissible for graves to be left in mosques, whether that is the grave of a wali (“saint”) or of anyone else, because the Messenger (PBUH) forbade that and warned against that, and he cursed the Jews and Christians for doing that.
It was narrated that he (PBUH) said: “May Allah curse the Jews and the Christians, for they took the graves of their Prophets as places of worship.” [Bukhaari, 1330, Muslim, 529]
He (PBUH) also said: “When a righteous man died among them, they would build a place of worship over his grave and put those images in it. They are the most evil of mankind before Allaah.” (Al-Bukhaari, 427; Muslim, 528)
He(PBUH) said: “Those who came before you took the graves of their Prophets and righteous people as places of worship. Do not take graves as places of worship – I forbid you to do that.” (Narrated by Muslim in his Saheeh, 532, from Jundab ibn ‘Abd-Allaah al-Bajali).
So the Prophet (PBUH) forbade taking graves as places of worship and he cursed those who do that, stating that they are the most evil of mankind. So we must beware of that.
Jabir said: Allah's Messenger PBUH forbade that the graves should be plastered or they be used as sitting places (for the people), or a building should be built over them. [Muslim :: Book 4 : Hadith 2116 also Muslim: Book 4: Hadith 2114]
Abu Wail reported that Sayyidina Ali (RA) said to Abu Hayyaj Asadi, “I am sending you to do what the Prophet sent me to do, (that) leave no high grave without levelling it (with the ground) and no picture without obliterating it.” [Tirmidhi 1051, Sahih by Albani also Abu Dawud 3218, Nisai 2027, also Muslim :: Book 4 : Hadith 2115]
It is known that everyone who prays at a grave (Dargah) is taking it as a place of worship, and whoever builds a mosque over a grave (Dargah) has taken it as a place of worship.
So we must keep graves far away from the mosques and not put graves inside mosques, in obedience to the command of the Prophet (PBUH) and so as to avoid the curse issued by our Lord against those who build places of worship over graves, because when a person prays in a mosque in which there is a grave, the Shaytaan tempt them to call upon the deceased or to seek his help, or to pray to him or prostrate to him, thus committing major shirk (polytheism) and going out of fold of Islam.
Everyone who looks at the state of the Muslim world and the shirk and exaggeration that have come about because of building mosques over tombs, venerating them, adorning them and appointing custodians for them, will realize that this is indeed a means that leads to ‘Grave Worshipping’.
Clearance Of Two Doubts.
Doubt No. 1: Some people use the story of the People of the Cave to support their specious argument that this is allowed: “(then) those who won their point said (most probably the disbelievers): ‘We verily, shall build a place of worship over them’” [al-Kahf 18:21]
The answer to that is: that Allaah has told us about the leaders and powerful people of that time, and that they said these words. That does not imply that ALLAH liked that or approved of them, rather ALLAH said that by way of blaming them and condemning their action.
This is indicated by the fact that the Messenger (PBUH) to whom this verse was revealed and who was the most knowledgeable of people as to how it should be interpreted, forbade his ummah to build mosques over graves, warned them against doing so, and cursed and condemned those who did that.
If that had been permissible, then the Messenger of Allaah (PBUH) would not have discouraged it in such emphatic terms, and gone to the extent of cursing those who did it, and said that they are the most evil of mankind before Allaah.
This is sufficient to convince the seeker of truth. Even if we were to assume that building places of worship over graves was permitted to those who came before us, it is not permissible for us to follow their example in that, because our sharee’ah abrogates the laws that came before it, and our Messenger (PBUH) is the Final Messenger whose sharee’ah is complete and universal.
He has forbidden us to build mosques over graves, so it is not permissible for us to go against him.
Doubt No. 2: There is another specious argument put forward by those who worship graves, namely the fact that the grave of the Prophet (peace and blessings of Allaah be upon him) is in his mosque.
Islam forbids erecting structures over graves, and commands that any such structures should be knocked down, as it surely leads to Grave worshipping thereby causing to commit shirk (polytheism- associaing partners with ALLAH) and eventually making the one to leave the fold of Islam.
The kalimah of Tawheed gets nullified and the one no longer remains Muslim. Shaykh‘Abd al-‘Azeez ibn Baaz (rahmahullah) said: The answer to that is that the Sahaabah (radhiallahuanhum) did not bury him in his mosque, rather they buried him in the house of ‘Aa’ishah (radhiallahu anha).
When al-Waleed ibn ‘Abd al-Malik expanded the Mosque of the Prophet (PBUH) at the end of the first century AH, he incorporated the room into the mosque, but he did wrong thereby, and some of the scholars denounced him for that, but he believed that there was nothing wrong with it for the sake of expanding the mosque.
It is not permissible for a Muslim to take that as evidence that mosques may be built over graves, or that people may be buried inside mosques, because that goes against the saheeh ahaadeeth, and because it is a means that may lead to shirk by associating the occupants of the graves in worship with Allaah.
End quote. Majmoo’ Fataawa al-Shaykh Ibn Baaz, 5/388, 389. Shaykh Muhammad ibn Saalih al-‘Uthaymeen (rahimahullah) was asked about the ruling on praying in a mosque in which there is a grave. He replied: Praying in a mosque in which there is a grave falls into two categories:
(i) Either the grave was there before the mosque, and the mosque was built over the grave. It is essential to shun this mosque and not pray therein, and the one who built it must knock it down; if he does not do so, then the Muslim authorities must knock it down.
(ii) Or the mosque was there before the grave, and the deceased was buried after the mosque was built. In the case the grave must be dug up, and the remains taken out and buried with the people (in the graveyard). As for praying in such a mosque, it is permissible so long as the grave is not in front of the worshipper, because the Prophet (PBUH) forbade praying in the direction of graves.
With regard to the grave of the Prophet (PBUH) which is incorporated into his mosque, it is well known that the Mosque of the Prophet (PBUH) was built before his death, and was not built over his grave.
It is also well known that the Prophet (PBUH) was not buried in the mosque, rather he was buried in his house which was separate from the mosque.
At the time of al-Waleed ibn ‘Abd al-Malik he wrote to his governor in Madeenah, who was ‘Umar ibn ‘Abd al-‘Azeez, in 88 AH, ordering him to dismantle the Prophet’s Mosque and add to it the rooms of the wives of the Prophet (PBUH).
‘Umar ibn Azeez gathered the prominent people and fuqaha’, and read the letter of the caliph al-Waleed to them. That caused them distress, and they said: “Leave it as it is, that is better.”
And it was narrated that Sa’eed ibn al-Musayyib denounced the incorporation of ‘Aa’ishah’s room into the mosque, as if he feared that the grave would be taken as a place of worship.
Umar ibn Azeez wrote a letter to that effect to al-Waleed, and al-Waleed sent word to him ordering him to carry out his instructions, so ‘Umar had no other choice.
So you see that the grave of the Prophet (PBUH) was not placed in the mosque, and the mosque was not built over it, so there are no grounds for those who try to quote this as evidence that people may be buried inside mosques or that mosques may be built over graves.
It is proven that the Prophet (PBUH) said: “May the curse of Allaah be upon the Jews and the Christians; they have taken the graves of their Prophets as places of worship.” He said that as he was dying, as a warning to his ummah against doing what they did.
When Umm Salamah told him of a church that she had seen in Ethiopia and the images therein, he said: “Those people, if a righteous man among them died, they would build a place of worship over his grave.
They are the most evil of people before Allaah.” And it was narrated from Ibn Mas’ood (RA) that the Prophet (PBUH) said: “Among the most evil of people upon whom the Hour will come when they are still alive are those who take graves as places of worship.”
Narrated by Imam Ahmad with a jayyid isnaad. [Majmoo’ Fataawa al-Shaykh Ibn ‘Uthaymeen, 12/question no. 292]
Jabir (RA) said: “Allah's Messenger (PBUH) forbade that the graves should be plastered or they be used as sitting places (for the people), or a building should be built over them.” [Muslim :: Book 4 : Hadith 2116 also Muslim: Book 4: Hadith 2114]
Abu Wail reported that Sayyidina Ali (RA) said to Abu Hayyaj Asadi, “I am sending you to do what the Prophet sent me to do, (that) leave no high grave without levelling it (with the ground) and no picture without obliterating it.” [Tirmidhi 1051, Sahih by Albani Abu Dawud 3218, Nisai 2027, also Muslim :: Book 4 : Hadith 2115]
ALLAH (SWT) Says: “Surely, the religion (i.e. the worship and the obedience) is for Allâh only. And those who take Auliyâ' (protectors, helpers, lords, gods) besides Him (say): "We worship them only that they may bring us near to Allâh." Verily, Allâh will judge between them concerning that wherein they differ. Truly, Allâh guides not him who is a liar, and a disbeliever.” [Surah Zumar, 039:003]
ALLAH (SWT) Says: "And they worship besides Allâh things that harm them not, nor profit them, and they say: "These are our intercessors with Allâh." [Surah Yunus, 10: 18]