Praying over the deceased in the mosque is permissible
Machine translationRead the Arabic original
Q: It is well known that the funeral prayer (janazah) is better performed in the prayer hall. Should a specific prayer hall be designated in the cemetery for the deceased, or should they be prayed over in the Eid prayer hall?
A: The deceased is prayed over in the mosque, whether male or female, unless there is a prayer hall prepared for funerals. In that case, the funeral prayer is performed there if it is feasible. If the funeral prayer is performed in the mosque, there is no harm in that, even if there is a prayer hall for funerals. This is because the Prophet (peace and blessings be upon him) prayed over the children of Bayda in the mosque.
A: The deceased is prayed over in the mosque, whether male or female, unless there is a prayer hall prepared for funerals. In that case, the funeral prayer is performed there if it is feasible. If the funeral prayer is performed in the mosque, there is no harm in that, even if there is a prayer hall for funerals. This is because the Prophet (peace and blessings be upon him) prayed over the children of Bayda in the mosque.
Source
binbaz.org.sa
The Arabic text is copied verbatim from the original source, without any edits.
