Is it permissible to pray behind people who are likely to curse the religion or believe in graves, knowing that the worshiper does not know them personally?
If the imam of the mosque does not curse religion and does not hold impermissible beliefs regarding graves, then prayer in this mosque is obligatory if no other mosque is available. The presence of some worshipers with corrupt beliefs does not justify abstaining from congregational prayer. However, if the imam is someone who curses religion, he is a disbeliever, and prayer behind him is not valid, for Allah Almighty says: "And if you ask them, they will surely say, 'We were only indulging in idle talk and play.' Say, 'Is it Allah and His verses and His Messenger that you were mocking?' Make no excuse; you have disbelieved after your belief." And if he holds impermissible beliefs regarding graves, then he is a wicked innovator.
Summarized from the full answer at Ftawy · reviewed Sep 2, 2026
Read the full answer on Ftawyhttps://ftawy.com/en/questions/49240