Yazid ibn Al-Aswad reported: I witness the Hajj pilgrimage with the Prophet, peace and blessings be upon him, and I prayed the dawn prayer with him in the mosque of Al-Khaif. When the Prophet finished his prayer and turned around, he saw two men in the back of the people who had not prayed with him. The Prophet said, “I must see them both.” I brought them while they were trembling with fear. The Prophet said, “What stopped you both from praying with us?” They said, “O Messenger of Allah, we had already prayed at our camp.” The Prophet said, “Do not do so. If you pray in your camp and then come to a congregation in the mosque, pray with them for it will be awarded to you as a voluntary deed.”
Al-Tirmidhi said, “It is the opinion of more than one of the scholars and it was said by Sufyan al-Thawri, Al-Shafi’i, Ahmad, and Ishaq. They said if a man prays alone and then reached the congregation, he should repeat all of the prayers with the congregation.”
Source: Sunan al-Tirmidhī 219
Grade: Sahih (authentic) according to Al-Albani
عن يزيد بن الأسود قَال شَهِدْتُ مَعَ النَّبِيِّ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ حَجَّتَهُ فَصَلَّيْتُ مَعَهُ صَلَاةَ الصُّبْحِ فِي مَسْجِدِ الْخَيْفِ قَالَ فَلَمَّا قَضَى صَلَاتَهُ وَانْحَرَفَ إِذَا هُوَ بِرَجُلَيْنِ فِي أُخْرَى الْقَوْمِ لَمْ يُصَلِّيَا مَعَهُ فَقَالَ عَلَيَّ بِهِمَا فَجِيءَ بِهِمَا تُرْعَدُ فَرَائِصُهُمَا فَقَالَ مَا مَنَعَكُمَا أَنْ تُصَلِّيَا مَعَنَا فَقَالَا يَا رَسُولَ اللَّهِ إِنَّا كُنَّا قَدْ صَلَّيْنَا فِي رِحَالِنَا قَالَ فَلَا تَفْعَلَا إِذَا صَلَّيْتُمَا فِي رِحَالِكُمَا ثُمَّ أَتَيْتُمَا مَسْجِدَ جَمَاعَةٍ فَصَلِّيَا مَعَهُمْ فَإِنَّهَا لَكُمَا نَافِلَةٌ
قال الترمذي وَهُوَ قَوْلُ غَيْرِ وَاحِدٍ مِنْ أَهْلِ الْعِلْمِ وَبِهِ يَقُولُ سُفْيَانُ الثَّوْرِيُّ وَالشَّافِعِيُّ وَأَحْمَدُ وَإِسْحَقُ قَالُوا إِذَا صَلَّى الرَّجُلُ وَحْدَهُ ثُمَّ أَدْرَكَ الْجَمَاعَةَ فَإِنَّهُ يُعِيدُ الصَّلَوَاتِ كُلَّهَا فِي الْجَمَاعَةِ
219 سنن الترمذي كتاب الصلاة باب ما جاء في فضل الجماعة باب ما جاء في الرجل يصلي وحده ثم يدرك الجماعة
219 المحدث الألباني خلاصة حكم المحدث صحيح في صحيح الترمذي