The Coalition - 33:21 In the Messenger of Allah is a good example for those of you who desire Allah and the Last Day and remember Allah often.
The example of the ambassador during war:
The Family Of Imran/3:152 Allah kept His promise to you, and indeed you destroyed them by His permission. But after He showed you what you loved, you hesitated and quarreled among yourselves about the war and did not listen to the orders. Some of you wanted the world and some the Hereafter. Then He turned you away from them as a test and forgave you in spite of everything. Allah is bountiful to those who believe
The Family Of Imran/3:153 You were climbing the hill without looking back at anyone, although the Messenger called you from behind. He gave you sorrow upon sorrow so that you might not grieve for what you had lost and what had happened to you. Allah is All-Knowing of what you do.
The Family Of Imran/3:172 Those believers who followed the call of Allah and His messenger even after they were wounded in battle. For those who do good and do righteous deeds there is a great reward.

The Repentance/9:117 Allah has accepted the repentance of the Messenger and those who emigrated and those who helped. They followed him at a time of difficulty when some of them almost lost heart. Then He accepted their turning (repentance). He is Most Compassionate towards them, Most Merciful.