Praise be to Allah.
If you join the congregation during the first tashahhud of Maghrib prayer, then you should follow the imam in the third rak’ah, and recite the tashahhud, then get up after he says the salaam to complete your prayer. You have two rak’ahs left, so pray the first one with al-Faatihah and another soorah, then recite the tashahhud, which is the first tashahhud for you, then get up for the third rak’ah, and recite al-Faatihah only, and recite the last tashahhud, then say the salaam.
What is stated above is based on the assumption that what the latecomer caught up with with the imam is the beginning of his own prayer, and what he prays on his own is the end of his prayer. This is the opinion of al-Shaafa’i (may Allaah have mercy on him).
Al-Nawawi (may Allaah have mercy on him) said in al-Majmoo’ (4/117): If he catches up with a rak’ah of Maghrib he should stand up after the imam says the salaam and pray one rak’ah and recite the tashahhud, then pray a third rak’ah and recite the tashahhud.
Then he said:
We have mentioned that our view is that what the latecomer catches up with is the first part of his prayer and what he makes up is the last part. This is the view of Sa’eed ibn al-Musayyib, al-Hasan al-Basri, ‘Ata’, ‘Umar ibn ‘Abd al-‘Azeez, Makhool, al-Zuhri, al-Awzaa’i, Sa’eed ibn ‘Abd al-‘Azeez and Ishaaq. Ibn al-Mundhir narrated it from them and said: This is also my opinion. He said: and it was narrated from ‘Umar, ‘Ali and Abu’l-Darda’, but that is not proven. It was also narrated from Maalik and was the view of Dawood.
Abu Haneefah, Maalik, al-Thawri and Ahmad said: What he caught up with is the latter part of his prayer and what he makes up is the first part of his prayer. This was narrated by Ibn al-Mundhir from Ibn ‘Umar, Mujaahid and Ibn Sireen. They quoted as evidence for that the words of the Prophet (peace and blessings of Allaah be upon him), “Whatever you catch up with, pray, and whatever you have missed, make it up.” Narrated by al-Bukhaari and Muslim. Our companions quoted as evidence the words of the Prophet (peace and blessings of Allaah be upon him): “Whatever you catch up with, pray, and whatever you have missed, complete it.” Narrated by al-Bukhaari and Muslim with many isnaads.
Al-Bayhaqi said: Those who narrated the words “complete it” are greater in number, have better memories and are closer to Abu Hurayrah who is the narrator of this hadeeth, so they are more correct. Shaykh Abu Haamid and al-Maawirdi said: Completing a thing can only be done after doing the first part of it. Al-Bayhaqi also narrated a view similar to ours from ‘Umar ibn al-Khattaab, ‘Ali, Abu’l-Darda’, Ibn al-Musayyib, Hasan, ‘Ata’, Ibn Sireen and Abu Qilaabah (may Allaah be pleased with them).
With regard to the report which says “make it up.” This may be answered in two ways:
1 – That those who narrated the words “complete it” are greater in number and have better memories
2 – That qada’ (the word translated here as “make it up”) is actually to be interpreted as meaning “do it” and not the usual sense in which the word is understood, because this usage is that of the later fuqaha’, whereas the Arabs used the word in the sense of doing. Allaah says (interpretation of the meaning):
“So when you have accomplished [qadaytum] your Manaasik (rituals of Hajj)”
“When you have finished [qudiyat] As-Salaah (the congregational prayer)”
Shaykh Abu Haamid said: What is meant is: what you have missed of your own prayer, not what you missed of the imam’s prayer; what the latecomer has missed of his own prayer is the latter part of it.
It says in Fataawa al-Lajnah al-Daa’imah (7/322):
Question: I would like to know more about how a latecomer should pray:
1-If the imam has already prayed one or two rak’ahs of Maghrib
2-If the imam has already prayed one or two rak’ahs of a four-rak’ah prayer.
What should he recite? Should he recite al-Faatihah only or another soorah as well?
Whatever the latecomer catches up with of the prayer with his imam is regarded as the first part of his prayer. So whoever catches up with one rak’ah of Maghrib, that is regarded as being the first part of his prayer. So he should stand up after the imam says the salaam and make up what he missed. In the first rak’ah he makes up he should recite al-Faatihah and another soorah or verses, because it is the second rak’ah for him. Then he should sit and recite the first tashahhud. Then when he stands up to make up the remaining rak’ah of Maghrib he should recite al-Faatihah only, because it is the third rak’ah for him. Then he should sit and recite the final tashahhud. If what he missed of Maghrib was one rak’ah, and he caught up with two rak’ahs with the imam, then he should recite al-Faatihah only in the last rak’ah that he makes up after the imam says the salaam, because it is the third rak’ah for him.
If it is a four-rak’ah prayer and he catches up with three or two rak’ahs with the imam, then he should recite al-Faatihah only in the one or two rak’ahs that he makes up, because that is the latter part of the prayer for him, so he does not have to recite another soorah as well as al-Faatihah. This is the correct scholarly view. And Allaah is the Source of strength. May Allaah send blessings and peace upon our Prophet Muhammad and his family and companions.
Standing Committee for Academic Research and Issuing Fatwas.
And Allaah knows best.