Is the prayer valid for someone who prayed Maghrib in congregation, then Isha by combining them, and remembered during the Isha prayer that he had not completed the last rak'ah of Maghrib, so he changed his intention to Maghrib and completed it with the Imam, then said "Allahu Akbar" for Isha and caught the fourth rak'ah with the Imam? And is there a better way? And is it permissible for him to continue the Isha prayer with the Imam and then make up for Maghrib afterwards? And should he pray Maghrib as three rak'ahs or make up for one rak'ah?
If someone combined the Maghrib and Isha prayers and remembered during Isha that Maghrib was invalid, they should interrupt Isha and begin the Maghrib prayer, because sequence is a condition for combining prayers by performing them earlier (jama' taqdim). If this is discovered after both prayers have been completed, the first prayer becomes void due to the omission of a pillar, and the second becomes void due to the absence of the condition of sequence. In this case, both prayers must be repeated.
The correct method is to interrupt the Isha prayer, then pray Maghrib individually, and then begin the Isha prayer. If one intended to pray Maghrib behind an imam who was praying Isha, their prayer is valid. However, if they changed their intention without restarting the prayer, their prayer becomes invalid.
If someone concluded the prayer by saying the salām out of forgetfulness before completing it, then if they remember after a long interval, they should restart the prayer. If they remember before a long interval, they should complete what remains and perform the prostration of forgetfulness (sujood as-sahw).
Summarized from the full answer at Ftawy · reviewed Sep 2, 2026
Read the full answer on Ftawyhttps://ftawy.com/en/questions/193596