and to erect any structure over them; such constructions must be demolished, and I know of no disagreement on this point among the recognised scholars.”
This ruling was cited by Ibn ʿUrwah al-Ḥanbalī in al-Kawākib al-Darārī (2/244/1), and he approved it.
Thus we see that the scholars are unanimously agreed—on the basis of the hadiths—that it is forbidden to turn graves into mosques. We therefore warn the believers against opposing them or departing from their way, lest they be encompassed by the threat in His words: “Whoever opposes the Messenger after guidance has become clear to him and follows a path other than that of the believers, We will leave him to what he has chosen and burn him in Hell—what an evil destination!” (1)
“And in this there is surely a reminder for anyone who has a heart or lends an ear while fully attentive.” (2)