Is the prayer of one who entered the mosque and found the congregation performing a prostration of forgetfulness valid if he prostrated with them believing it to be a prostration of prayer, then made the salutation with the Imam, left the rest of the prayer, and went to pray with another congregation from the beginning?
Whoever joins the Imam before the Taslim has caught the congregation according to the majority of scholars, contrary to the Malikis. It would have been better to complete the missed part of the prayer without interrupting it and moving to another congregation. What was done, by repeating the prayer with another congregation, fulfills the obligation.
Summarized from the full answer at Ftawy · reviewed Sep 2, 2026
Read the full answer on Ftawyhttps://ftawy.com/en/questions/36876