Sahih Bukhari Volume 4, Book 52, Hadith Number 162.
Narated By Jabir bin ‘Abdullah : That he participated in a Ghazwa (Holy-Battle) in the company of Allah’s Apostle. Midday came upon them while they were in a valley having many thorny trees. The people dispersed to rest in the shade of the trees. The Prophet rested under a tree, hung his sword on it, and then slept. Then he woke up to find near to him, a man whose presence he had not noticed before. The Prophet said, “This (man) took my sword (out of its scabbard) and said, ‘Who will save you from me.’ I replied, ‘Allah.’ So, he put the sword back into its scabbard, and you see him sitting here.” Anyhow, the Prophet did not punish him. (See Hadith No. 158)