and died defiantly disobedient.” And He said:
“It is all the same for them whether you ask forgiveness for them or not: Allah will never forgive them.”
As for those who openly commit sins while retaining faith, such as those who commit major sins, some Muslims must offer the funeral prayer for them. Whoever refrains from offering the funeral prayer for one of them to deter others like him from similar conduct acts commendably in following this Sunnah. The Prophet, peace and blessings be upon him, refrained from offering the funeral prayer for someone who killed himself, someone who misappropriated war booty, and someone who died in debt without leaving the means to repay it. Likewise, many of the early generations refrained from offering the funeral prayer for adherents of religious innovations.
(Jundub ibn ‘Abd Allāh al-Bajalī’s son once told him, “I could not sleep last night because of indigestion from overeating.” He replied, “Indeed, had you died, I would not have offered the funeral prayer for you”) (*).
It is as though he were saying, “You killed yourself by overeating.” This is akin to shunning those who openly commit major sins until they repent. When doing so serves an overriding benefit of this kind, it is commendable. Likewise, if someone offers the funeral prayer for one of them, hoping that Allah will have mercy on him, and refraining would serve no overriding benefit, that too is commendable. If he were to refrain publicly while supplicating for the deceased privately, thereby combining both benefits, securing both would be preferable to forfeiting either one.
It is permissible to seek forgiveness for any Muslim who is not known to be a hypocrite and to offer the funeral prayer for him. Indeed, this is prescribed and enjoined, as Allah Most High said:
“Ask forgiveness for your sin, and for the believing men and women.”
Anyone who openly commits major sins may be punished by being shunned