almighty allah ordered his prophet peace be upon him to pardon people and said: so by mercy from allah, you were lenient with them. and if you had been rude [in speech] and harsh in heart, they would have disbanded from about you. so pardon them and ask forgiveness for them and consult them in the matter. (3:159)
and he said: so pardon them and overlook [their misdeeds]. indeed, allah loves doers of good. (5:13)
the prophet peace be upon him used to like pardon and prefer clemency. he would not resort to punishment unless there was no way to avoid it. there are many well-known instances of pardon in the prophet's biography, among them that which he granted the people of makkah after the conquest.
among them also is what was related by abu hurayrah: the messenger of allah peace be upon him sent a cavalry toward najd and they brought back a man from the tribe of bani hanifah called thumamah ibn uthaal, a noble from the people of yamamah. they tied him to one of the pillars of the masjid. the prophet peace be upon him went over to him and said, "what do you have in mind, o thumamah?" he replied, "i have something good, o muhammad. if you should kill me, you would kill a person who has killed, and if you should set me free, you would do a favour to one who is grateful, and if you want wealth, then ask and you will be given what you wish." the messenger of allah peace be upon him left him until the next day, when he peace be upon him said, "what do you have in mind, o thumamah?" he said, "what i have told you: if you should kill me, you would kill a person who has killed, and if you should set me free, you would do a favour to one who is grateful, and if you want wealth, then ask and you will be given what you wish." so, the messenger of allahpeace be upon him left him until the next day, when he said, "what do you have in mind, o thumamah?" he said, "what i have told you: if you should kill me, you would kill a person who has killed, and if you should set me free, you would do a favour to one who is grateful, and if you want wealth, then ask and you will be given what you wish."
the messenger of allah peace be upon him then said, "release thumamah." so, thumamah went to a palm garden near the masjid and bathed. then he entered the masjid and said, "i testify that there is no god but allah and i testify that muhammad is his servant and messenger. o muhammad, by allah, there was no face on the surface of the earth more hated by me than yours, but now your face is the most beloved face to me. by allah, there was no religion on the surface of the earth more hated by me than yours, but now your religion is the most beloved one to me. by allah, there was no city on the surface of the earth more hated by me than yours, but now your city is the most beloved one to me. your cavalry took me while i was intending `umrah, so what do you think?" allah's messenger gave him good tidings and ordered him to perform `umrah.
when he went to makkah, someone there said, "have you become a sabian?" thumamah replied, "no, by allah. i have embraced islam with muhammad, the messenger of allah peace be upon him. no, by allah. not a single grain of wheat will come to you from yamamah unless the messenger of allahpeace be upon him permits it." (al-bukhari and muslim) notice how pardon can change hearts, alter conditions, transform attitudes and disperse the darkness’s of disbelief and error.
another example is the prophet's peace be upon him pardon of the jewish woman who put poison in his meat; but when he ate from it, he did not swallow it. however, he later had her executed in legal retribution for bishr ibn al-baraa' ibn ma`rur, who had swallowed the meat and died from the effect of the poison.
and yet another example is the narration by jabir may allah be pleased with him: we went out on a campaign toward najd, and when the messenger of allah peace be upon him returned, we returned with him. just before noon, we came to a valley with many thorny trees. the messenger of allah peace be upon him dismounted, and the men went and sought shade under the trees. he also sat under a tree and hung his sword on it.
we slept briefly and suddenly heard the messenger of allah peace be upon him calling us, so we went to him and found a bedouin sitting near him. he peace be upon him said,
"this man pulled down my sword while i was asleep, and i awoke while it was drawn in his hand. he said to me, 'who can save you from me?' i said, 'allah.' and here he is, sitting." and the messenger of allah did not punish him. (al-bukhari)