What is the ruling of praying behind a Qāzi’ (a person who has shaved parts of his head and left other parts)?
It is obligatory to advise this person who proceeds to the Imāmship of the prayer with being upright, because the Prophet ﷺ said:
“The religion is sincere advise.”
If he persists, then the people should strive to replace him by permissible legislated means which are far from Fitnah, like informing it’s respective authorities or other than this.
If this is not possible, and a person was to be in an area where there is only this Masjid where the Imām is of those that are publicising and manifesting sin, then he prays the obligatory prayers behind him.
As the obligatory prayers are sound behind a person who is a sinner or a person of innovation who has not reached the level which warrants expulsion from Islām, upon that which is most correct.
And if there was another Masjid where it’s Imām is of a better condition, then it becomes a must that he prays his prayer there, as the need to pray behind an Imām who is a sinner is lifted by the presence by this other person, acting upon the legislative texts of abandonment of the people of sin and innovation, and the lack of increasing of their ranks and the veneration which occurs of themselves (in regards to the number of their attendees).
As for if there was no replacement or nowhere else to pray then the benefits of praying the obligatory prayer in congregation are preceeded.
As for what relates to the Tarawīh, then it is not prayed behind a person of sin and innovation, acting upon the salafi narrations of their abandonment and the distancing of increasing their ranks.
And our shaykh [the ‘Allāmah Al-Hajoori] has a fatwa in clarification of this which has been transmitted.
Shaykh Abu Hatim Yusuf Al-‘Inaabi Al-Jazaa’iree – may Allah preserve him.
7th, Rabē’l Ākhar, 1438H.
Abu ‘Abdirrahman ‘Abdullaah bin Ahmed Ash-Shingaani.