We set out with the Messenger of Allah ﷺ until we reached Dhat al-Riqa. Whenever we came upon a shady tree, we would leave it for the Messenger of Allah ﷺ.A man from the polytheists came while the sword of the Messenger of Allah ﷺ was hanging on a tree. He took the sword of the Prophet of Allah ﷺ and unsheathed it.He said to the Messenger of Allah ﷺ, "Do you fear me?"The Messenger of Allah ﷺ replied, "No."The man asked, "Then who will protect you from me?"The Messenger of Allah ﷺ answered, "Allah will protect me from you."The companions of the Messenger of Allah ﷺ threatened him, so he sheathed the sword and hung it back up.Then the call to prayer was made. He led one group in two units of prayer, then they withdrew, and he led the other group in two units of prayer. So the Messenger of Allah ﷺ prayed four units, while the people prayed two each.
أقبلنا مع رسول الله ﷺ، حتى إذا كنا بذات الرقاع، قال: كنا إذا أتينا على شجرة ظليلة تركناها لرسول الله ﷺ، قال: فجاء رجل من المشركين وسيف رسول الله ﷺ معلق بشجرة. فأخذ سيف نبي الله ﷺ فاختر طه. فقال الرسول الله ﷺ: أتخافني؟ قال: لا قال: فمن يمنعك مني؟ قال: الله يمنعني منك قال: فتهدده أصحاب رسول الله ﷺ. فأغمد السيف وعلقه. قال: فنودي بالصلاة فصلى بطائفة ركعتين ثم تأخروا وصلى بالطائفة الأخرى ركعتين. قال: فكانت الرسول الله ﷺ أربع ركعات وللقوم ركعتان.
Muslim narrated it in "The Prayer of Travelers" (843:311) from Abu Bakr bin Abu Shayba, who said, Affan (he is Ibn Muslim) told us, Aban bin Yazid told us, Yahya bin Abu Kathir told us, from Abu Salama, from Jabir, who said, then he mentioned it. As for Bukhari, he related it in "The Military Expeditions" (4136) from Aban bin Yazid, as a suspended report with this chain of transmission.