Ruling on Funeral Prayer for people transgressing Shari'ah

Question:

If a Muslim transgresses the Shari’ah (Islamic law), should Muslims offer Funeral Prayer for him on his death or not?

Answer:

If the person transgressing the Shar’ah is deemed a Murtad (apostate), the funeral Prayer should not be offered for him. However, if he is deemed only a sinner like a person committing Zina (sexual intercourse outside marriage), consuming Khamr (intoxicant) or committing any other sin without regarding them as lawful, funeral Prayer can be offered for him and Allah may be beseeched to forgive and have mercy on him for he is just a sinner. If such a person used to commit any sin that leads to Riddah (apostasy), like abandoning Salah, denying its very obligation, committing Zina and regarding it as lawful, blasphemy against the religion or the Prophet, or making a mockery of the Prophet, funeral Prayer should not be offered for him. This is tantamount to Riddah. We ask Allah for salvation.