the prophet, may allah exalt his mention, was well-known for his honesty. the pagans of makkah -who were openly hostile towards him- would leave their trust-items with him. his honesty and loyalty was tested when the pagans of makkah abused him and tortured his companions and drove them out of their homes. he ordered his nephew, ali b. abi talib, with whom allah is pleased, to postpone his migration for three days to return to people their trust-items.
another example of his honesty and loyalty is demonstrated in the truce of hudaibiyah, wherein he agreed to the article in the treaty which stated that any man who left the prophet, may allah exalt his mention, would not be returned to him, and any man who left makkah would be returned to them. before the treaty was concluded a man named abu jandal b. amr had managed to escape from the pagans of makkah and rushed to join muhammad, may allah exalt his mention. the pagans asked muhammad to honor his pledge and return the escapee. the messenger of allah, may allah exalt his mention, said:
'o abu jandal! be patient and ask allah to grant you patience. allah will surely help you and those who are persecuted and make it easy for you. we have signed an agreement with them, and we certainly do not betray or act treacherously.' (baihaquee #18611)