Is the prayer valid if I entered the mosque after having performed the obligatory prayer and prayed with a worshiper who had begun his obligatory prayer, intending it as an obligatory prayer, then completed the missed rak'ah after the Imam's taslim?
If you entered the mosque after the prayer had finished and found someone who had missed the prayer, like yourself, and he had begun to pray individually, and then you and others joined him and prayed with him for what you caught up with, and then each person made up what they missed individually, then your prayer is valid.
However, there are two points:
1. Forming a congregation in a mosque that has a regular Imam is a point of contention among scholars: Some scholars (like Ibn Mas'ud and Malik) dislike it, fearing the dispersion of the main congregation, and prefer praying in a congregation at home except in the three mosques (the Two Holy Mosques and Al-Aqsa). Others permit it, citing the hadith of Abu Sa'id Al-Khudri. The preponderant opinion is that it is permissible, as long as it does not become a habit.
2. Does the one who started praying individually, and then others joined him, attain the virtue of congregational prayer? Scholars differed on this. Some said he does not fully attain the virtue of congregational prayer, while others said he does. The latter opinion is correct, and it is supported by the hadith of Ibn Abbas with the Prophet, peace and blessings be upon him.
Summarized from the full answer at Ftawy · reviewed Sep 2, 2026
Read the full answer on Ftawyhttps://ftawy.com/en/questions/32462