yet the rest of the Muslims should still perform the funeral prayer for him, for through this act he is counted among the sinners—and such people are in even greater need of the Muslims’ intercession, which is secured by their prayer, than anyone else.
5 – The scholars state that praying over the dead is a firmly established practice—clearer than the midday sun. During the Prophetic era and ever since, the funeral prayer was never omitted for any deceased Muslim. Imam Ahmad said, “The Prophet ﷺ left off the prayer only for one who misappropriated war-booty and for one who took his own life.”
6 – Shaykh al-Islam observed: “Whoever outwardly professes Islam is entitled to the outward legal rulings of Islam: his body is washed, the funeral prayer is offered for him, and he is buried in the Muslims’ cemetery, and the like. As for someone whose hypocrisy or atheism is known, it is impermissible for anyone aware of that to pray over him, even if he appears outwardly Muslim.”
7 – According to all four Sunni legal schools, the funeral prayer is performed even for a flagrant sinner. The Prophet ﷺ refrained from praying over the embezzler of war-booty and the suicide only to deter the people, while the Companions did pray over them. Al-Nawawī said, “The consensus of the scholars is to pray over every Muslim.” Imam Ahmad added, “Whoever faces our qiblah and performs our prayer, we pray over him and bury him, for the Messenger ﷺ said: ‘Pray over anyone who says, There is no god but Allah.’ ”
Differences among the scholars
The funeral prayer is a communal obligation (farḍ kifāyah) by unanimous agreement. Shaykh al-Islam explained: “When a single individual fulfills a communal duty, the rest are cleared of sin; if everyone performs it, it becomes obligatory for each of them.” Ibn ʿAqīl noted that this is a point of consensus.
The funeral prayer is a distinctive feature of this ummah: it multiplies the reward of those who perform it and serves as intercession for the deceased.
The scholars have disagreed over praying for people guilty of certain specific sins. The Ḥanafīs hold that there are four categories for whom the funeral prayer is not performed, namely: