Is it permissible to perform the funeral prayer (Salat al-Janazah) inside a graveyard?
General Chapter
Al-Mughni
Book of Funerals
Primary text
Performing the funeral prayer in the graveyard is permissible. This view is held by Ahmad, based on one narration. Evidence supporting this view includes the Prophet (peace be upon him) praying over a grave that was in a graveyard. Furthermore, it is reported that Aisha and Umm Salama were prayed over amidst the graves in Al-Baqi' cemetery; Abu Hurairah led the prayer for Aisha, and Ibn Umar was present, with Umar bin Abdul Aziz also doing this.
Supporting text
It is disliked to perform the funeral prayer in the graveyard. This opinion is narrated from Ali, Abdullah bin Amr bin Al-As, and Ibn Abbas. It is also the position of 'Ata, Al-Nakha'i, Al-Shafi'i, Ishaq, and Ibn al-Mundhir. The evidence cited is the hadith stating, "The entire earth is a mosque except for the graveyard and the bathhouse." Additionally, since the graveyard is not a place designated for prayer other than the funeral prayer, performing the funeral prayer there is disliked, similar to the bathhouse.