Sahih Muslim
Sahih Muslim 843a
حَدَّثَنَا أَبُو بَكْرِ بْنُ أَبِي شَيْبَةَ، حَدَّثَنَا عَفَّانُ، حَدَّثَنَا أَبَانُ بْنُ يَزِيدَ، حَدَّثَنَا يَحْيَى، بْنُ أَبِي كَثِيرٍ عَنْ أَبِي سَلَمَةَ، عَنْ جَابِرٍ، قَالَ أَقْبَلْنَا مَعَ رَسُولِ اللَّهِ صلى الله عليه وسلم حَتَّى إِذَا كُنَّا بِذَاتِ الرِّقَاعِ قَالَ كُنَّا إِذَا أَتَيْنَا عَلَى شَجَرَةٍ ظَلِيلَةٍ تَرَكْنَاهَا لِرَسُولِ اللَّهِ صلى الله عليه وسلم - قَالَ - فَجَاءَ رَجُلٌ مِنَ الْمُشْرِكِينَ وَسَيْفُ رَسُولِ اللَّهِ صلى الله عليه وسلم مُعَلَّقٌ بِشَجَرَةٍ فَأَخَذَ سَيْفَ نَبِيِّ اللَّهِ صلى الله عليه وسلم فَاخْتَرَطَهُ فَقَالَ لِرَسُولِ اللَّهِ صلى الله عليه وسلم أَتَخَافُنِي قَالَ " لاَ " . قَالَ فَمَنْ يَمْنَعُكَ مِنِّي قَالَ " اللَّهُ يَمْنَعُنِي مِنْكَ " . قَالَ فَتَهَدَّدَهُ أَصْحَابُ رَسُولِ اللَّهِ صلى الله عليه وسلم فَأَغْمَدَ السَّيْفَ وَعَلَّقَهُ - قَالَ - فَنُودِيَ بِالصَّلاَةِ فَصَلَّى بِطَائِفَةٍ رَكْعَتَيْنِ ثُمَّ تَأَخَّرُوا وَصَلَّى بِالطَّائِفَةِ الأُخْرَى رَكْعَتَيْنِ قَالَ فَكَانَتْ لِرَسُولِ اللَّهِ صلى الله عليه وسلم أَرْبَعُ رَكَعَاتٍ وَلِلْقَوْمِ رَكْعَتَانِ .
Abu Bakr ibn Abi Shayba narrated to us; 'Affan narrated to us; Aban ibn Yazid narrated to us; Yahya ibn Abi Kathir narrated to us, from Abu Salama, from Jabir, who said: We set out with the Messenger of Allah (ﷺ), and when we reached Dhat al-Riqa', whenever we came upon a shady tree, we left it for the Messenger of Allah (ﷺ). A man from the polytheists came while the Messenger of Allah's sword was hanging from a tree. He took the Prophet of Allah's sword out of its sheath and said to the Messenger of Allah (ﷺ): Are you afraid of me? He replied: No. The man said: Who will protect you from me? He replied: Allah will protect me from you. The companions of the Messenger of Allah (ﷺ) threatened the man, so he sheathed the sword and hung it back up. Then the call to prayer was made. The Prophet (ﷺ) prayed two rak'ahs with one group, then they withdrew, and he prayed two rak'ahs with the other group. Thus the Messenger of Allah (ﷺ) prayed four rak'ahs, while the people prayed two.
Translation notes
The report says the Prophet prayed four rakahs across the two groups, while each person prayed two.