Once Prophet Muhammad (peace be upon him) was taking rest under a tree when he was returning from an expedition and hung his sword from the tree. A Non-Muslim person came quietly, took hold of the sword and, addressing the Prophet said to him: "O Muhammad! now who will save you from my hand?" The Prophet heard it, rose up from his seat and said: "Allah will save me." Hearing the name of Allah, he was overawed and the sword slipped from his hand. The Prophet rose up from his place, took the sword into his hand and questioned him: "Now who will save you from my hand?" He felt sorry and begged apology. The Prophet forgave him. He was so impressed by this kindness that he embraced Islam. He then went to his tribesmen and expressed that he never found a man better than Muhammad (peace be upon him).
Source: "The Miracles of the Prophet" by Shaikh Ahmed S. Dehalvi; also related in Bukhari and other sources with slight variations.
Related to the protection of the Prophet Muhammad, Allah has mentioned in the Quran "O Apostle! proclaim the message which has been sent to you from your Lord. If you do not do it, you would not have fulfilled and proclaimed this mission. And Allah will defend you against men who mean mischief. For Allah guides not those who reject faith." (Al Quran 5:67).