What is the ruling on praying behind an imam of a congregation who does not observe the boundaries set by Allah, such as looking at forbidden things and listening to music, especially when no one else is available to lead the prayer in the desert?
Allah has legislated congregational prayer, and the most deserving of leading it are those who have memorized Allah's Book best and are most knowledgeable of the Sunnah. The jurists have agreed that it is disliked to pray behind a fasiq (open sinner), and they differed regarding the validity of such a prayer. Some of them invalidated it absolutely, while others differentiated between sinfulness related to prayer, which invalidates it, and sinfulness unrelated to prayer, which does not invalidate it; this latter view is the most preferred. The imam should be advised to repent, and if he does not respond and it is possible to replace him, then they should do so. Otherwise, they should pray behind him and not miss the congregation, for the Prophet, peace and blessings be upon him, said: "They lead you in prayer; if they are correct, it is for you and for them, and if they err, it is for you and against them."
Summarized from the full answer at Ftawy · reviewed Sep 2, 2026
Read the full answer on Ftawyhttps://ftawy.com/en/questions/77142