Is it permissible to pray in mosques that contain graves or are adjacent to graves of righteous saints, caliphs, and companions, for fear of missing the obligatory congregational prayer due to the long distance from other mosques?
It is not permissible to pray in a mosque that contains a grave due to the prohibition by the Prophet, peace and blessings be upon him. However, if the grave is next to the mosque and outside its boundaries, then prayer is permissible. If all the mosques in your town contain graves, then do not pray in them. Instead, pray in a neighboring town, or in your home, or anywhere else, even if that leads to missing the congregational prayer.
Summarized from the full answer at Ftawy · reviewed Sep 2, 2026
Read the full answer on Ftawyhttps://ftawy.com/en/questions/56461