are more severely forbidden than turning their graves into mosques.
And in al-Iqtidaʾ he said:
“Those mosques that have been built over the graves of prophets, righteous people, kings, and others must be removed—whether by demolition or by some other means—and I know of no disagreement on this point among the recognized scholars. Praying in them is disapproved without, to my knowledge, any dissent, and according to the apparent position of our school the prayer is invalid because of the explicit prohibition and the curse reported concerning it, as well as other hadiths.
There is no dispute here even when only a single individual is buried inside. Our companions differed only with respect to a cemetery that has no mosque attached to it: is the boundary three graves, or is one forbidden to pray by a solitary grave even when there is no other grave nearby? Two opinions have been transmitted. (I add: in another book Shaykh al-Islām favored the view that the prohibition applies even at a single grave, and that has already been mentioned.)
Originally, the structure over the grave of Abraham—peace be upon him—was sealed off, and no one could enter it until about the beginning of the fourth century AH. It is said that a woman connected to the caliphs saw a dream about it and therefore had an opening made; others say that when the Christians seized those regions they broke into it. After the later Muslim reconquests it was left as a mosque. The people of virtue among our own shaykhs would not pray anywhere within that entire structure and would forbid their students to do so, following the command of the Messenger of Allah ﷺ and steering clear of disobedience to him, as noted above.”
He then added:
“His prohibition against taking graves as mosques entails both forbidding the construction of mosques over them and forbidding the deliberate intention to pray beside them, and both matters are prohibited by consensus of the scholars. They have forbidden building mosques over graves—indeed, they have explicitly declared it unlawful, as the textual evidence indicates—and they have likewise agreed that it is not prescribed to seek out prayer and supplication at graves—"