عَنْ جَابِرِ بْنِ عَبْدِ اللَّهِ رَضِيَ اللَّهُ عَنْهُ أَنَّ سُلَيْكًا جَاءَ وَرَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَآلِهِ وَسَلَّمَ يَخْطُبُ فَجَلَسَ فَأَمَرَهُ النَّبِيُّ صَلَّى اللَّهُ عَلَيْهِ وَآلِهِ وَسَلَّمَ أَنْ يُصَلِّيَ رَكْعَتَيْنِ، ثُمَّ أَقْبَلَ عَلَى النَّاسِ فَقَالَ: ((إِذَا جَاءَ أَحَدُكُمْ وَالْإِمَامُ يَخْطُبُ فَلْيُصَلِّ رَكْعَتَيْنِ يَتَجَوَّزْ فِيهِمَا))
Sayyiduna Jabir bin Abdullah (may Allah be pleased with him) narrates that Sayyiduna Sulaik (may Allah be pleased with him) came and sat down while the Messenger of Allah (peace and blessings be upon him) was delivering the sermon. The Prophet (peace and blessings be upon him) ordered him to pray two rak‘ahs, and then turned to the people and said: When any of you comes (to the mosque) and the Imam is delivering the sermon, he should perform two rak‘ahs of prayer briefly.