Source: Fatawa of Ahl-e-Hadith Scholars, Kitab al-Salah, Volume 1, Page 247
"فلیؤمکم خیارکم"
"Let the best among you lead the prayer."
This indicates that the Imam should be a righteous and pious person. Therefore, it is essential for an Imam to be adherent to the Sunnah.
If the Imam is clearly involved in shirk (polytheism) or bid‘ah (innovation) from the outset, then Salah behind such an Imam is not valid, and it is not permissible to follow him in prayer.
However, if on a rare occasion, one happens to perform Salah behind such an Imam unintentionally or by compulsion, then it is permissible to follow him in that case. This is supported by the Hadith:
"صَلّوا خلفَ كل برٍّ وفاجرٍ"
"Pray behind every righteous and sinful person."
This allowance is only for occasional and rare instances. One must not regularly perform Salah behind such an Imam.
Reference: Ahl-e-Hadith Sohadra, Volume 13, Issue 14
❖ Question:
Is it permissible to perform Salah behind a polytheist (mushrik) or an innovator (bid'ati)?❖ Answer:
It is stated in a Hadith:"فلیؤمکم خیارکم"
"Let the best among you lead the prayer."
This indicates that the Imam should be a righteous and pious person. Therefore, it is essential for an Imam to be adherent to the Sunnah.
If the Imam is clearly involved in shirk (polytheism) or bid‘ah (innovation) from the outset, then Salah behind such an Imam is not valid, and it is not permissible to follow him in prayer.
However, if on a rare occasion, one happens to perform Salah behind such an Imam unintentionally or by compulsion, then it is permissible to follow him in that case. This is supported by the Hadith:
"صَلّوا خلفَ كل برٍّ وفاجرٍ"
"Pray behind every righteous and sinful person."
This allowance is only for occasional and rare instances. One must not regularly perform Salah behind such an Imam.