What is the ruling regarding someone who prayed the Isha congregational prayer, thinking it was the Maghrib prayer, so he completed four rakahs and saluted with the Imam, and then it became clear to him that it was the Isha prayer (offered by way of الجمع - combining prayers), and he did not know the ruling after five minutes? Should he repeat the prayer or perform the prostration of forgetfulness (sujud al-sahw)? And what is the ruling if a long period of time has passed?
It is not permissible for the congregant to follow the Imam if doing so invalidates his prayer, such as when the Imam stands for an extra rak'ah (unit of prayer) that is not part of the congregant's prayer. In the mentioned case, where the Imam stood for a fourth rak'ah in the 'Isha prayer while the congregant was praying Maghrib, following him invalidates the congregant's prayer, and he must repeat it. It is not permissible for the congregant to follow the Imam in an extra rak'ah, even if that rak'ah would complete the congregant's prayer, because in this situation the Imam is not performing a valid prayer.
Summarized from the full answer at Ftawy · reviewed Sep 2, 2026
Read the full answer on Ftawyhttps://ftawy.com/en/questions/56330