What is the ruling on mosques that contain graves, based on the noble verse: "And similarly, We made them [the people] aware of them that they [the people] might know that the promise of Allah is truth and that the Hour—there is no doubt about it. When they disputed among themselves about their affair, they said, 'Construct over them a structure.' Their Lord is most knowing about them. Said those who prevailed in the matter, 'We will surely take a place of worship over them'"?
Building a mosque over the location of the People of the Cave does not contradict the prohibition against building mosques over graves. This is because this action was undertaken by the rulers of that era, not by people of knowledge. Furthermore, those who did so might have been accursed Christians, or Muslims who explicitly violated clear texts. Some scholars are of the opinion that the verse does not directly indicate building over graves, but rather that the mosque might have been at the entrance of the cave.
Summarized from the full answer at Ftawy · reviewed Sep 2, 2026
Read the full answer on Ftawyhttps://ftawy.com/en/questions/189202