Is it permissible for a traveler, upon finding people praying 'Isha in congregation, and not yet having prayed Maghrib, to join them with the intention of praying Maghrib in the second rak'ah, and then to make taslim with them, and thereafter pray 'Isha as two rak'ahs?
You are not accountable for what you did, and your prayer is valid.
Summarized from the full answer at Ftawy · reviewed Sep 2, 2026
Read the full answer on Ftawyhttps://ftawy.com/en/questions/51431