Allah—for that proclamation proves he died a Muslim.
3 – Some scholars, among them the Hanbalis, made an exception regarding the funeral prayer for the ghāll (one who misappropriates war booty) and the person who takes his own life; it is recommended that the supreme leader, or his deputy, refrain from praying over either of them as a disciplinary measure and a deterrent, so that others may take heed.
4 – The ḥadith also shows the validity of the leadership of a fāsiq (open sinner), because the phrase of sincerity establishes his Islam but does not establish his uprightness. If uprightness were a pre-condition, people would be obliged to investigate and verify it.
5 – Shaykh al-Islām said: The leading jurists unanimously agree that it is disliked to pray behind a fāsiq. Al-Māwardī added: It is forbidden for the ruler to appoint a fāsiq to lead the prescribed prayers, for he is charged with safeguarding the public interest.
6 – The ḥadith further indicates that a person may pray behind someone whose state—whether sinful or upright—is unknown; knowledge of the imam’s condition is not required.
Disagreement among the scholars
The scholars differed as to whether the prayer behind a fāsiq is valid or not.
• Mālik and Aḥmad—in the view most widely transmitted from him—held that it is not valid.
• Abū Ḥanīfah, al-Shāfiʿī, and another narration from Aḥmad maintained that it is valid.
This latter opinion was chosen by Shaykh al-Islām, Ibn al-Qayyim, Shaykh ʿAbd al-Raḥmān al-Saʿdī, Shaykh ʿAbd al-ʿAzīz ibn Bāz, and other verifying scholars; indeed, Ibn ʿUmar prayed behind al-Ḥajjāj while he was shedding blood, and behind al-Mukhtār ibn Abī ʿUbayd, who was accused of sorcery and trickery.
The basic principle is that whoever’s own prayer is sound may validly lead others, and the prayer of a fāsiq for himself is, by unanimous agreement, sound.
The Shaykh said: It is not a condition for the follower to be aware of his imam’s beliefs.