Is the prayer of one who caught the Imam in the second rak'ah of Maghrib, and joined him with the intention of Dhuhr due to travel, valid? And how does he make up what he missed after the salutation? And does he perform one rak'ah and then tashahhud, then another rak'ah and then tashahhud?
The ruling we adhere to is that a difference in intention between the Imam and the follower does not cause harm, so it is valid to pray Dhuhr behind Maghrib. This is the view of the Shafi'i school. The follower must pray Dhuhr as four rak'ahs as long as their Imam is a resident, even if the Imam prays Maghrib.
Regarding how to make up what was missed, consider what you caught with the Imam as the beginning of your prayer. After the Imam says the salām, you perform one rak'ah, in which you stand after the two prostrations without tashahhud (because it is the third), then another rak'ah in which you perform tashahhud and say the salām (because it is the fourth). The Imam's recitation of a surah in the second rak'ah suffices for you. If you have not recited a surah in the rak'ahs you are making up, then recite it in the first of them. And omitting the recitation of a surah after Al-Fatihah does not invalidate the prayer according to the majority of scholars.
Summarized from the full answer at Ftawy · reviewed Sep 2, 2026
Read the full answer on Ftawyhttps://ftawy.com/en/questions/160078