Congregational Prayer and Its Virtue
Man Lā Yaḥḍuruh al-Faqīh|Volume 1|Book 1|Chapter 57
وَ سَأَلَهُ إِسْحَاقُ بْنُ عَمَّارٍ قَالَ لَهُ: أَدْخُلُ اَلْمَسْجِدَ وَ قَدْ رَكَعَ اَلْإِمَامُ فَأَرْكَعُ بِرُكُوعِهِ وَ أَنَا وَحْدِي وَ أَسْجُدُ فَإِذَا رَفَعْتُ رَأْسِي فَأَيَّ شَيْءٍ أَصْنَعُ قَالَ «قُمْ فَاذْهَبْ إِلَيْهِمْ فَإِنْ كَانُوا قِيَاماً فَقُمْ مَعَهُمْ وَ إِنْ كَانُوا جُلُوساً فَاجْلِسْ مَعَهُمْ.
Ishaq ibn Ammar asked Imam عليه السلام: "I enter the mosque, and the Imam is already in the bowing position (ruku'), so I bow with him while I am alone and then prostrate. When I lift my head, what should I do next?" Imam عليه السلام replied: "Stand up and go to join them (the congregation). If they are standing, then stand with them, and if they are sitting, then sit with them."
- Ṣaḥīḥ al-Faqīh, p. 56