Is it permissible to offer the funeral prayer in the graveyard?
Scholars differ on the ruling of performing the funeral prayer (Salat al-Janazah) in a graveyard, holding two opinions:
1. It is permissible, which is the view of the Hanafis and one narration from Ahmad. This is because the Prophet, peace and blessings be upon him, prayed over a grave while it was in the graveyard.
2. It is disliked (makrooh). This is the view of Ali ibn Abi Talib, Abdullah ibn Amr ibn al-Aas, and Ibn Abbas. It was also held by Ata and Al-Shafi'i, and it is another narration from Ahmad. This is based on the Prophet's, peace and blessings be upon him, saying: "The entire earth is a masjid (place of prayer), except for the graveyard and the bathroom."
The more preponderant opinion is that prayer in a graveyard is disliked. As for the Prophet's prayer over a grave, it was for those who missed the funeral prayer (Salat al-Janazah), in which case they are permitted to pray over it in the graveyard.
Summarized from the full answer at Ftawy · reviewed Sep 2, 2026
Read the full answer on Ftawyhttps://ftawy.com/en/questions/35366