وَعَلَى مَنْ مَاتَ مِنْهُمْ
And for those among them who die, we also regard the funeral prayer as valid.
The funeral prayer involves supplication and recognition of a person’s apparent profession of Islam. Where a person dies with the outward identity of a Muslim, sinfulness alone does not warrant treating the person as outside this ruling. The same principle connects communal worship with the rights of deceased Muslims.