Question
Is it permissible to pray behind a polytheist or an innovator?
Answer
It is stated in the noble hadith: “فلیؤمکم خیارکم” meaning that a person of righteous deeds and a good person should lead the prayer. Therefore, it is necessary for the imam to be committed to the Sunnah. If the imam’s shirk or innovation is clear and he has been like that from the beginning, then prayer following such an imam will not be valid, and it is not permissible to pray behind him.
However, if on rare occasions it happens by chance that one has to pray behind such an imam, then following him, willingly or unwillingly, is permitted, as it is stated in the hadith: “صَلّوا خلفَ کل برٍّ وفاجرٍ” (Pray behind every righteous person and every sinner).
This permission is only for incidental and rare occasions; one should not follow such an imam permanently.