Is the prayer of one who intended to pray 'Isha (the night prayer), then joined a congregation praying Maghrib (the sunset prayer) and prayed three rak'ahs with them, then performed a fourth rak'ah alone, valid, or must it be repeated?
The preponderant opinion is that it is permissible and valid for someone praying 'Isha' to follow someone praying Maghrib. The worshipper's assumption that the Imam is praying 'Isha' while he is in fact praying Maghrib does not affect the validity of the worshipper's prayer, as long as the worshipper intends to pray 'Isha'. However, if someone performs the taslim before completing their prayer while being aware of it, their prayer becomes invalid, and they must repeat it.
Summarized from the full answer at Ftawy · reviewed Sep 2, 2026
Read the full answer on Ftawyhttps://ftawy.com/en/questions/80101