Is it permissible to build or purchase a mosque near a non-Muslim cemetery?
Islamic Sharia prohibits the use of graves as mosques or praying towards them, whether they are the graves of Muslims or polytheists, because this is a cause of fitna (discord/temptation) and shirk (polytheism). It is narrated in the Hadith that "The entire earth is a masjid except for the graveyard and the washroom." If graves are close to the location of a masjid, there is no harm in building the masjid, provided three conditions are met: that the intention behind building the masjid is not to glorify the graves, that the graves are not in thebla of the masjid, and that the masjid is completely separated from the graveyard by a clear and definitive partition, such that the masjid's separation from it is entirely evident, perhaps by a road or similar means.
Summarized from the full answer at Ftawy · reviewed Sep 2, 2026
Read the full answer on Ftawyhttps://ftawy.com/en/questions/12184