What is the ruling on the prayer of one who prayed outside the mosque facing a direction other than the Qiblah, and is it permissible to pray in front of the Imam?
If the worshippers outside the mosque deviate from the Qiblah such that they are not facing it, their prayer is invalid, and your prayer is also invalid if you pray with them while not facing the Qiblah. However, if the deviation is slight, such that it can still be said that they are facing the direction of the Kaaba, then their prayer and your prayer are valid. Nevertheless, it is better to face the Qiblah to avoid disagreement. As for the prayer of the congregants in front of the Imam, there is a difference of opinion on this matter, but the more preponderant view is that it is valid if the advancement is due to an excuse.
Summarized from the full answer at Ftawy · reviewed Sep 2, 2026
Read the full answer on Ftawyhttps://ftawy.com/en/questions/189160