﷽
Shaykh Ibn ʿUthaymīn -may Allāh have mercy on him- was asked:
Q: Some worshippers were delayed in praying Maghrib, and they found that the imam had started to pray ʿIshāʾ. Should they pray Maghrib in a congregation on their own, or join the imām? And how should they pray?

A: The correct view is that if a person comes (to the masjid) and the imām is praying ʿIshāʾ, whether he is with a group or not, he should join the imām, with the intention of praying Maghrib. It does not matter if the imām’s intention is different from that of one who is praying behind him, because the Prophet ﷺ said:
إنما الأعمال بالنيات وإنما لكل امرئ ما نوى
“Actions are but by intentions, and each person will have that which he intended.”
If they join him in the second rakʿah, they can say the taslīm with him, because they will have prayed three rakʿahs, and it does not matter if they sit for the Tashahhud during their first rakʿah. If they join him in the first rakʿah, then when he stands up for the fourth rakʿah, they can sit and recite the Tashahhud and say the taslīm, then join him in what remains of ʿIshāʾ prayer.
The second view concerning this matter is that they should join him with the intention of praying ʿIshāʾ, then pray Maghrib after that, and the obligation to offer the prayers in order is waived because of the duty to join the congregation.
The third view is that they should pray Maghrib on their own, then join him in whatever is left of ʿIshāʾ prayer.
The last two views involve something about which there is some reservation:
– The first view involves neglecting the order of prayers by putting ʿIshāʾ before Maghrib.
– The second view involves having two congregations in one masjid at the same time, which is dividing the ummah.
But the first view which we mentioned is the correct one. One might say that there is a potential issue, which is saying the taslīm before the imām. In fact there is nothing wrong with this.
– It is narrated in some places in the Sunnah that a member of the congregation may do something separately from the imām, such as in the fear prayer, where the imām leads them in one rakʿah, then they complete the prayer by themselves and leave.
– Another example is the story of the man who joined Muʿādh bin Jabal -may Allāh be pleased with him- in prayer, but when he started to recite Sūrah al-Baqarah or another similar sūrah, he left him and did not complete the prayer with him. (Al-Bukhārī 6106)
– And the scholars said that if a man is praying in congregation then he feels that is about to pass wind or that he needs to break his wudūʾ by urinating or defecating, then there is no sin on him if he decides to pray alone and completes his prayer and leaves.
This indicates that praying alone in the case of need is not regarded as wrong.
– Liqāʾāt al-Bāb il-Maftūḥ, 3/425
وسئل الشيخ ابن عثيمين رحمه الله :
تأخر المصلون عن صلاة المغرب ، فوجدوا أن الإمام قام إلى صلاة العشاء ، فهل يصلون المغرب جماعة أم يدخلون مع الإمام ؟ وكيف يكون حالهم في الصلاة ؟
فأجاب :
” الصحيح أن الإنسان إذا جاء والإمام في صلاة العشاء ، سواء كان معه جماعة أم لم يكن ، فإنه يدخل مع الإمام بنية المغرب ، ولا يضر أن تختلف نية الإمام والمأموم لعموم قول النبي صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ : ( إنما الأعمال بالنيات وإنما لكل امرئ ما نوى ) . فإن دخلوا معه في الركعة الثانية سلموا معه ، لأنهم يكونون صلوا ثلاثاً ، ولا يضر أن يكون جلسوا في الركعة الأولى ، وإن دخلوا معه في أول ركعة ، فإذا قام إلى الرابعة جلسوا وتشهدوا وسلموا ، ثم دخلوا معه فيما بقي من صلاة العشاء .
القول الثاني في المسألة : أن يدخلوا معه بنية العشاء ، ويصلوا بعده المغرب ويسقط الترتيب هنا مراعاةً للجماعة .
القول الثالث :
أن يصلوا وحدهم صلاة المغرب ، ثم يدخلوا معه فيما بقي من صلاة العشاء ، والقولان الأخيران فيهما محذور ، أما الأول فمحذوره فوات الترتيب حيث قدم صلاة العشاء على صلاة المغرب ، وأما الثاني فمحذوره إقامة جماعتين في مسجد واحد وفي آن واحد ، وهذا تفريق للأمة .
أما القول الأول الذي ذكرنا أنه الصحيح ، فربما قال قائل إن فيه محذوراً وهو تسليم هؤلاء قبل أن يسلم إمامهم ، وهذا في الحقيقة ليس فيه محذور ، فقد ورد انفراد المأموم عن الإمام في مواضع من السُّنَّة ، منها : صلاة الخوف ، فإن الإمام يصلي بهم ركعة ثم يتمون لأنفسهم وينصرفون .
ومنها : قصة الرجل الذي دخل مع معاذ بن جبل رضي الله عنه ، فلما بدأ بسورة البقرة أو سورة نحوها انفصل عنه ولم يكمل معه .
ومنها : أن العلماء قالوا : لو أن الإنسان أثناء الصلاة وهو مأموم ثارت عليه الريح (الغازات) أو احتاج إلى نقض الوضوء ببول أو غائط ، فإنه لا بأس أن ينوي الانفراد ويكمل صلاته وينصرف ، فهذا يدل على أن الانفراد لحاجة لا يعتبر محذوراً ” انتهى .
“لقاءات الباب المفتوح” (3/425) .