The Messenger of Allah (ﷺ) said during his illness from which he never recovered: Allah cursed the Jews and the Christians that they took the graves of their prophets as mosques. She ('A'isha) reported: Had it not been so, his (Prophet's) grave would have been in an open place, but it could not be due to the fear that it may not be taken as a mosque.
Hadith Text & Context
The Messenger of Allah (ﷺ) said during his illness from which he never recovered: Allah cursed the Jews and the Christians that they took the graves of their prophets as mosques. She ('A'isha) reported: Had it not been so, his (Prophet's) grave would have been in an open place, but it could not be due to the fear that it may not be taken as a mosque.
Reference: Sahih Muslim 529 | Book: The Book of Mosques and Places of Prayer
Scholarly Commentary
This profound hadith establishes one of Islam's fundamental principles: the absolute prohibition of building mosques over graves or turning burial sites into places of worship. The divine curse mentioned emphasizes the gravity of this innovation, which leads to shirk (associating partners with Allah).
Imam An-Nawawi explains that the Prophet's warning serves to protect tawhid (monotheism) by preventing excessive veneration that could lead to worshipping other than Allah. The Companions' precaution in concealing the Prophet's burial location demonstrates their understanding and implementation of this prohibition.
This ruling applies universally to all graves, not merely prophets' graves, as the underlying wisdom - preventing shirk - remains the same. Muslims must maintain the purity of mosque worship, dedicated solely to Allah without any intermediaries or distractions.
Legal Rulings Derived
Building mosques containing graves is strictly forbidden
Praying in cemeteries is prohibited except for funeral prayers
Elevating graves or constructing domes over them is unlawful
Visiting graves is permitted for remembrance, but any acts resembling worship are forbidden