Jabir bin Abdullah reported,

He reported that he went on a military expedition with the Messenger of Allah ﷺ toward Najd. When the Messenger of Allah ﷺ turned back, he returned with him. The time for the midday rest overtook them in a valley filled with thorny acacia trees. The Messenger of Allah ﷺ dismounted, and the people scattered to take shade under the trees. The Messenger of Allah ﷺ settled under a Samura tree and hung his sword on it. We slept for a while, and then the Messenger of Allah ﷺ was calling us, and there was an Arabi beside him.He said, "This man drew my sword on me while I was asleep. I woke up to find it unsheathed in his hand. He asked, 'Who will protect you from me?' I replied, 'Allah,' three times."He did not punish him, and he sat down.

Bukhari 2910

Sahih

حدثنا أبو اليمان أخبرنا شعيب عن الزهري قال حدثني سنان بن أبي سنان الدؤلي وأبو سلمة بن عبد الرحمن أن

جابر بن عبد الله رضي الله عنهما

أخبر أنه غزا مع رسول الله ﷺ قبل نجد فلما قفل رسول الله ﷺ قفل معه فأدركتهم القائلة في واد كثير العضاه فنزل رسول الله ﷺ وتفرق الناس يستظلون بالشجر فنزل رسول الله ﷺ تحت سمرة وعلق بها سيفه ونمنا نومة فإذا رسول الله ﷺ يدعونا وإذا عنده أعرابي فقال إن هذا اخترط علي سيفي وأنا نائم فاستيقظت وهو في يده صلتا فقال من يمنعك مني فقلت الله ثلاثا ولم يعاقبه وجلس

البخاري 2910صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Bukhari
Book
Jihad and expeditions
Chapter
Hanging one's sword on a tree while traveling at midday rest
Numbering
Darussalam 2910
Bukhari 2910