Allah, Most High, says about the People of the Cave and their people (interpretation of meaning): And similarly, We caused them to be found that they who found them would know that the promise of Allah is truth and that of the Hour there is no doubt. That was when they disputed among themselves about their affair and then said, "Construct over them a structure. Their Lord is most knowing about them." Said those who prevailed in the matter, "We will surely take for ourselves over them a masjid." Quran 18:21
The ayah speaks about the People of the Cave, whom Allah, Exalted be He, kept in a deep sleep for many years (more than three centuries), then awakened them from their slumber in their very state before they were put to sleep. Afterward, He caused their people to find them to know first-hand that the divine promise of resurrection is true, so they would not doubt the Power of their Creator and His Ability to resurrect them after death and know that the Day of Judgment is true and shall inevitably come. Some of these people believed in the resurrection, while others denied it. Those whom Allah caused to find the People of the Cave said after their death, ‘Let us build a structure over their bodies to hide their place of burial; their Lord knows best about them and their state.’ The chiefs of the city, who were in charge of these people, said, ‘Let us build a mosque to be a place of worship,’ as a gesture of reverence and honoring. Allah, Exalted be He, relates in the Quran that building mosques over graves were done by the chiefs who were in charge of those people’s affairs, and this implies that it was more of an exercise of power and dominion and following personal desires and whims, rather than an act done by righteous scholars, who followed the guidance revealed by Allah to His Messengers. Building mosques over graves involves excessive veneration of the dead people buried therein. [331] See: ((Al-Tafseer Al-Muharrar - Surat Al-Kahf)) (p.: 112-115, 133)
Ibn Baaz said: (Allah, Exalted be He, relates the statement of their chiefs and those in charge of those people, and the ayah does not imply the approval of their act. Rather, it denotes dispraise, reproach, and disapproval of their act. This is evidenced by the fact that when the ayah was revealed to the Prophet ?, who was the most knowledgeable of its interpretation, he ? forbade Muslims from building mosques over graves, warned them against that act, and cursed and vilified those who did so. Had it been permissible, he ? would not have strictly prohibited it and stated such stern warnings against this act. He ? even cursed the doer of such act and described him as the most wicked of all people in the sight of Allah. In fact, this (compelling argument) is adequate to convince the truth-seekers in this regard. However, even if we assume that building mosques over graves was permissible for the previous nations, it is impermissible for us to follow their example in this regard, because the Islamic law abrogates the previous divine laws revealed to the preceding nations. The Prophet ? is the final Prophet, his legislations are perfect and universal, and he ? forbade us from building mosques over graves. Therefore, it is not permissible for us to disobey him, and it is incumbent on us to follow his commands, adhere to the Sharee’ah revealed to him, and give up whatever previous divine laws and customary acts, which were agreeable to their doers, which contravene it. Verily, the Sharee’ah of Allah, Exalted be He, is the most perfect divine law and the Prophet’s guidance is the best guidance.” [332] See: ((Majmoo’ Fataawa Ibn Baaz)) (1/435).
‘Aa’ishah and Ibn ‘Abbaas (may Allah be pleased with them) said: “On his deathbed, the Prophet ? had a Khamisah (woolen sheet) over his face. When his temperature rose, he would uncover his face. In such state, he ? said: ‘May Allah curse the Jews and Christians; they took the graves of their Prophets as places of worship,’ warning against their act.” [333] Narrated by Al-Bukhaaree (no. 3453, 3454), and Muslim (no. 531)
It is narrated on the authority of ‘Abdullah ibn Mas‘ood (may Allah be pleased with him) that the Prophet ? said: “Among the most wicked of people are those who will be living at the time when the Hour will come, and those who take the graves as places of worship.” [334] It was narrated by Al-Bukhaaree with a shorter wording with an omitted chain of narrators using the verb (Sama‘a, meaning hear) in the active form (no. 7067), and it was also narrated by Ahmad (no. 3844) with a connected chain of narration. It was classified as Saheeh by Ibn Hibbaan in his Saheeh (no. 6847), Ibn Al-Qayyim in “Al-Jawaab Al-Kaafi” (101), Al-Albaanee in “Tahtheer Al-Saajid” (26), and Al-Thahabi classified it as Saheeh in “Siyar A‘alaam Al-Nubalaa’” (9). /401), and Al-Waadi’i in “Al-Saheeh Al-Musnad” (832), and Ibn Taymiyyah judged its chain of transmission as authentic in “Sharh Al-‘Umdah, Al-Salaah” (427), Ibn Katheer in “Nihaayat Al-Bidaayah wa Al-Nihaayah” (1/216), and Ahmad Shaakir in his revision of ((Musnad Ahmad)) (6/90), and Shu‘ayb Al-Arnaa’oot in his revision of ((Musnad Ahmad)) (3844). Al-Shawkani classified it as Jayyid (good) in ((Al-Fat-h Al-Rabbani)) (6/3101). Al-Haythami stated, in “Majma’ Al-Zawaa’id” (8/16), that it was narrated with two chains of transmission, one of which included ‘Aasim ibn Bahdalah, who was trustworthy, but was said to have some weakness, but the rest of the reporters have been approved by Al-Bukhaaree. It is noteworthy that there is no difference between building mosques over graves and burying someone inside a mosque; both acts are forbidden. The prohibition of building mosques over graves necessitates the prohibition of praying therein, because the prohibition of the means leading to specific results necessitates the prohibition of these results and employing such means to realize those results. [335] See: ((Tahtheer Al-Saajid min Itikhaath Al-Quboor Masaajid)) (p. 31)
The Hadeeth in which the Prophet ? forbade taking the graves as places of worship was confirmed by Tawaatur, as mentioned by a group of scholars. [336] See: ((Al-Muhalla)) by Ibn Hazm (4/30), “Iqtidaa’ Al-Siraat Al-Mustaqeem” by Ibn Taymiyyah (2/184), “Haqeeqat Al-Sunnah wa Al-Bid‘ah” by Al-Suyootee (p.: 113), “Nathm Al-Muntanaathir min Al-Hadeeth Al-Mutawaatir)) by Al-Kitaani (p. 103).
Ibn Taymiyyah said: (It is forbidden to install lights on the graves and build mosques over and between them, and they must be removed ... I do not know of any difference of opinion among well-known scholars in this regard.” [337] See: ((Al-Fataawa Al-Kubra)) (5/361)
The four schools of Fiqh are in agreement on the prohibition of taking graves as places of worship, and some of them declared such act a major sin:
1- The Hanafi school of Fiqh:
Muhammad ibn Al-Hassan, the student of Aboo Haneefah, said: (We do not believe that that there is anything else to be added after his statements in this regard. We believe that it is disliked plastering the graves, coat them with clay, or build mosques next to them, put gravestones, or write on them.” [338] See: ((Athaar)) (1/266)
2- The Maliki school of Fiqh:
Al-Qurtubee said, after citing the (previously cited) Hadeeth about the most wicked of all people [339] The Hadeeth was narrated with the following wording: “Umm Habeebah and Umm Salamah mentioned a church they had seen in Abyssinia (Ethiopia) and in the church there were images (statues). When they told the Prophet ? of this, he said, "When a pious man among those people died, they would build a place of worship over his grave and make these images (statues) in it. Those people will be the worst of all the creation in the sight of Allah on the Day of Resurrection.” Narrated by Al-Bukhaaree (427) with this wording, and Muslim (528) on the authority of ‘Aa’ishah (may Allah be pleased with her). : (Our scholars held that it is forbidden for Muslims to take the graves of the Prophets and scholars as places of worship). [340] See: ((Tafseer Al-Qurtubee)) (10/380)
3- The Shaafi’ee school of Fiqh:
Al-Shaafi’ee said: (I dislike for a mosque to be built over the grave, flatten it to the level of the ground, or to pray on it while it is not flattened, or to pray towards it … However, were someone to pray in the direction of a grave, his prayer is valid, but he has committed a misdeed.” [341] See: ((Al-Umm)) (2/632)
Al-Albaanee said: (I do not rule out that the previously cited statement by Al-Shaafi’ee meant that such acts are prohibitively disliked, because this is the religious meaning denoted by the Quranic term ... Therefore, I am certain that Al-Shaafi’ee held that these acts are prohibited). [342] See: ((Tahtheer Al-Saajid min Itikhaath Al-Quboor Masaajid)) (p. 35)
4- The Hanbali school of Fiqh:
Al-Bahooti said: “It is forbidden (to build mosques over graves) (and this was further indicated by the Hadeeth narrated on the authority of Aboo Hurayrah (may Allah be pleased with him) that the Prophet ? said: ‘May Allah curse the Jews; they took the graves of their Prophets as places of worship.’ Al-Bukhaari and Muslim) It is obligatory to demolish the mosques that were built over graves or between them. In the book Al-Hadiy Al-Nabawi, Ibn Qayyim Al-Jawzeeyyah said, ‘If the mosque and grave were built at the same time, this act is impermissible, and endowing such mosque and praying therein are invalid, giving predominance to the relevant prohibition.” [343] See: ((Kashshaa Al-Qinaa‘ ‘an Matn Al-Iqnaa‘)) (4/220).
Ibn Taymiyyah said: (The four Imaams agreed that it is prohibited to build mosques over graves ... and that it is impermissible to bury a dead person inside a mosque. If the mosque was built before the burial, the grave must be removed either by levelling it with the ground or moving the dead body if it was recently buried. If the mosque is built over the grave, the mosque must be demolished or else the grave must be obliterated. It is impermissible to perform obligatory or voluntary prayers in a mosque that is built over a grave, given the reported prohibition in this regard.” [344] See: ((Majmoo’ Al-Fataawa)) (22/194)
Al-Suyootee said: (The mosques that are built over graves must be demolished, and there is no difference of opinion among the leading scholars in this regard. It is disliked to pray in such mosques and this is agreed-upon as well. Imaam Ahmad held that such prayer is invalid, according to the adopted and confirmed opinion of the Hanbali school, given the reported prohibition in this regard and the cursing of the doer.” [345] See: ((Al-Amr bil-Itibaa‘ wa Al-Nahy ‘an Al-Ibtidaa‘)) (p.: 115) The Prophet ? forbade taking his grave as a place of ritual celebration: It was narrated on the authority Aboo Hurayrah (may Allah be pleased with him) that the Prophet ? said: “Do not turn your houses into graves, and do not make my grave a place of ritual celebration, but invoke blessings on me, for your blessing will reach me wherever you are.” [346] It was narrated by Aboo Daawood (no. 2042) with this wording, and Ahmad (no. 8804). It was classified as Saheeh by Al-Albaanee in “Saheeh Sunan Aboo Daawood” (no. 2042), and it was also classified as Saheeh by Shu‘ayb Al-Arnaa’oot in his revision of “Sunan Aboo Daawood” (no. 2042), and Ibn Taymiyyah judged it as Saheeh in “Al-Ikhnaa’iyah” (265), and Muhammad ibn ‘Abd Al-Haadi in ((Al-Saarim Al-Munki)) (207), and Ibn Hajar in “Al-Futooh Al-Rabbaaniyyah” (3/314), and its chain of transmission was judged as authentic by Al-Nawawee in “Al-Majmoo’” (8/275), and Ibn Al-Qayyim classified it as Hasan in “Ighaathat Al-Lahfaan” (1/300), and Ibn Baaz judged its chain of narrators as Jayyid (good) in “Majmoo’ Al-Fataawa” (2/386).
The point is that the Prophet’s grave is the best grave on the face of the earth, and he ? forbade taking it as a place of ritual celebration. Therefore, it is forbidden to take any other grave as a place of ritual celebration for a greater reason, regardless of the refined status of the dead person buried therein. Moreover, this prohibition was coupled with the command reading, ‘Do not turn your houses into graves.’ meaning do not refrain from performing prayers, reciting supplications, and reciting the Quran therein lest they become lifeless, more of graves. He ? commanded Muslims to show keenness in performing worshipful acts in their houses and forbade performing them at the graves, in contrary to the action of the polytheist Christians and those who imitate them. [347] See: ((Al-Amr bil-Itibaa‘ wa Al-Nahy ‘an Al-Ibtidaa‘)) (p. 110).
Moreover, he ? followed the prohibition of taking his grave as a place of ritual celebration by saying, “Invoke blessings on me, for your blessing will reach me wherever you are,’ [348] It was narrated by Aboo Daawood (no. 2042) with this wording, and Ahmad (no. 8804). It was classified as Saheeh by Al-Albaanee in “Saheeh Sunan Aboo Daawood” (no. 2042), and was also classified as Saheeh by Shu‘ayb Al-Arnaa’oot in his revision of “Sunan Aboo Daawood” (no. 2042), and Ibn Taymiyyah judged it as Saheeh in “Al-Ikhnaa’iyah” (265), and Muhammad ibn ‘Abd Al-Haadi in ((Al-Saarim Al-Munki)) (207), and Ibn Hajar in “Al-Futooh Al-Rabbaaniyyah” (3/314), and its chain of transmission was judged as authentic by Al-Nawawee in “Al-Majmoo’” (8/275), and Ibn Al-Qayyim classified it as Hasan in “Ighaathat Al-Lahfaan” (1/300), and Ibn Baaz judged its chain of narrators as Jayyid (good) in “Majmoo’ Al-Fataawa” (2/386). He ? said in another Hadeeth: “Your prayers and salutations reach me wherever you may be,” [349] It was reported by Ibn Aboo Shaybah (no. 7624), Aboo Ya’la (no. 469), and Al-Diyaa’ in ((Al-Ahaadeeth Al-Mukhtaarah)) (no. 428) on the authority of ‘Ali ibn Aboo Taalib (may Allah be pleased with him). Al-Sakhaawi classified it as Hasan in “Al-Qawl Al-Badee’” (228), and Muhammad ibn ‘Abd Al-Haadi judged it as Jayyid (good) in “Al-Sarim Al-Munki” (206), and Ibn Taymiyyah said in “Al-Ikhnaa’iyyah” (346): It was reported with good chains of narration reinforcing each other. meaning that whenever you invoke peace and blessings on me, it will reach me whether or not you were near my grave; there is no need to take it as a place of ritual celebration. [350] See: ((Iqtidaa’ Al-Tareeq Al-Mustaqeem Li-Mukhaalafat Ashaab Al-Jaheem)) by Ibn Taymiyyah (2/172)
The prescribed manner of visiting the graves is for a visitor to remember death, reflect on the reality of the worldly life, and supplicate Allah, Exalted be He, in favor of the dead people, without travelling specifically to visit such graves or committing Sharee’ah violations in the process.
Al-Suyootee said: (It is recommended for a visitor of the graves to reflect on his fate in the Hereafter, greet the dead people buried therein, and supplicate Allah for them ... All other acts and practices that fall under the category of religious innovations such as praying at the graves, taking them as places of worship, and building mosques over them, were prohibited by the Prophet ? as stated in Hadeeths that are confirmed by Tawaatur. Stern warnings were reported against the doers of such acts. [351] See: ((Al-Amr bil-Itibaa‘ wa Al-Nahy ‘an Al-Ibtidaa‘)) (p. 112-113).
Al-Barkawee (Birgivi) said: “Visiting the graves to perform prayer therein, circumambulating them, kissing them, touching them, pressing one’s cheeks against them, and taking some of their soil … None of these acts and practices is prescribed according to the agreement of the scholars. They were not done by the Prophet ?, the Companions, the Taabi‘oon, and the leading Muslim scholars). [352] See: ((Ziyaarat Al-Quboor Al-Shar‘iyyah was Al-Shirkiyyah)) (p.: 33)
Buraydah (may Allah be pleased with him) said: “The Prophet ? taught us that when we visit graves we should say, ‘Peace be upon you, O believing men and women, O dwellers of this place. Certainly, we will join you, Allah willing. We implore Allah to bless us and you with well-being.’” [353] Narrated by Muslim (no. 975). Another version was narrated with the following addition: “May Allah have mercy on those who have gone ahead of us, and those who shall come later on.” [354] It was narrated by Muslim (no. 974) on the authority of ‘Aa’ishah (may Allah be pleased with her).