Traveler Praying Behind a Resident Imam: Two or Four Rak‘ahs?
Question
If a traveler joins the congregational prayer with a resident imam during the last two rak‘ahs, then:
◈ Will he pray only his shortened (two-rak‘ah) prayer?
◈ Or will he complete the full four-rak‘ah prayer afterwards?
◈ If he prays only two rak‘ahs, can he finish with the imam while the imam continues four rak‘ahs?
✔ Answer
Al-ḥamdu lillāh, waṣ-ṣalātu wa-salāmu ʿalā Rasūlillāh, ʿammā baʿd!
Imām al-Shawkānī (رحمه الله) mentions in Nayl al-Awṭār with reference to Musnad Aḥmad (Vol. 3, p. 205, Bāb Iqtidā’ al-Muqīm bil-Musāfir) the following ḥadīth:
Ḥadīth of Ibn ʿAbbās (RA)
“عَنِ ابْنِ عَبَّاسٍ أَنَّهُ سُئِلَ مَا بَالُ الْمُسَافِرِ يُصَلِّي رَكْعَتَيْنِ إِذَا انْفَرَدَ وَأَرْبَعًا إِذَا ائْتَمَّ بِمُقِيمٍ؟ فَقَالَ: تِلْكَ السُّنَّةُ.”
"Ibn ʿAbbās (RA) was asked: Why does a traveler pray two rak‘ahs when alone, but four when he follows a resident imam? He replied: That is the Sunnah."
In another narration, Mūsā ibn Salamah said: “When we are with you, we pray four rak‘ahs, but when we return, we pray two.” Ibn ʿAbbās (RA) replied: “That is the Sunnah of Abū al-Qāsim ﷺ.”
Ḥāfiẓ Ibn Ḥajar (رحمه الله) cited this ḥadīth in al-Talkhīṣ without objection and confirmed its origin in Ṣaḥīḥ Muslim and al-Nasā’ī, where Ibn ʿAbbās (RA) was asked:
"When I am in Makkah but not praying with the imam, how should I pray?"
He replied: “Two rak‘ahs — that is the Sunnah of Abū al-Qāsim ﷺ.”
⚖ Fiqh Conclusion
From this ḥadīth it is clear that:
◈ A follower cannot pray fewer rak‘ahs than the imam, for that would contradict the Sunnah of the Messenger of Allah ﷺ.
◈ Therefore, if a traveler prays behind a resident imam, he must complete the full four rak‘ahs with the imam, even though he himself is a traveler.
ھذا ما عندي، والله أعلم بالصواب
"This is what I hold, and Allah knows best what is correct."