“Performing the prayer in mosques that are built over graves is absolutely forbidden. His Mosque, however—may Allah bless him and grant him peace—is exempt from that ruling, for one prayer there is worth a thousand prayers elsewhere. It was founded upon piety, and its sanctity was already established during his lifetime, peace be upon him, and during the lives of the Rightly Guided Caliphs, long before the living-quarters (ḥujrah) were enclosed within it; that room was only incorporated after the generation of the Companions had passed away.
He then said ⦗67/1–69/2⦘: “Even before the room was added, the Mosque possessed excellence. Its virtue lay in the fact that the Prophet—may Allah bless him and grant him peace—built it for himself and for the believers, so that he and the believers might worship Allah there until the Day of Resurrection. The very building was ennobled because of him. How, then, when he has declared: ‘One prayer in this Mosque of mine is better than a thousand prayers in any other mosque except the Sacred Mosque’ (1); and when he said: ‘Saddle-bags are not to be packed except for three mosques: the Sacred Mosque, al-Aqsa Mosque, and this Mosque of mine’ (2)?”