over ʿUmar in the mosque.”
Al-Khattābī remarked, “It is common knowledge that the vast majority of the Muhājirūn and the Anṣār were present on that occasion.”
4 – Abū Ḥanīfah and Mālik held it disliked to perform the funeral prayer inside the mosque. Within the Ḥanafī school some classify the dislike as taḥrīm (prohibitive) while others, a view preferred by Kamāl ibn al-Humām, take it as tanzīh (merely discouraged). The Mālikīs regard it as tanzīh.
Their evidence is the hadith recorded by Abū Dāwūd (3191) and Ibn Mājah (1517) from Abū Hurayrah, traced back to the Prophet ﷺ: “Whoever offers the funeral prayer for a deceased person in the mosque will receive no reward for it.” Ibn al-Qayyim graded this narration acceptable in al-Hady. They further reason that the mosque was established for the prescribed daily prayers and that a corpse might soil it.
The response is that the hadith is not an acceptable proof, as the author of Naṣb al-Rāyah related from al-Nawawī and others. The mosque is designated for acts of worship, among them the funeral prayer. As for possible defilement: if soiling is certain, then—according to the majority—it is forbidden to pray there; if it is only a possibility, that mere possibility does not negate the permissibility of the prayer. Imām Aḥmad said, “Nothing the Messenger of Allah ﷺ himself did should be considered reprehensible.”