Pardoning someone when you have the power to punish is one of the customary practices of the messengers and the secrets of the Allah-fearing. Pardon is when you do not charge your companion for what he has done wrong outwardly, when you forget the cause by which there was inward affliction, and when you extend great charity in your choice despite having power over him.
No one could find a way to that pardon except by the one whom Allah has pardoned and forgiven for the sins which he has committed and the deeds he has put off, and who has been adorned with His mark of honour and clothed in the light of His radiance.
This is because pardon and forgiveness are two of the attributes of Almighty Allah which He entrusted in the secrets of His pure friends, so that they adopt the manners of their Creator and Maker with creation. This is why He said,
وَلْيَعْفُوا وَلْيَصْفَحُوا أَلَا تُحِبُّونَ أَن يَغْفِرَ اللَّهُ لَكُمْ وَاللَّهُ غَفُورٌ رَّحِيمٌ
If you do not pardon another mortal like yourself, how can you hope for the pardon of the Compelling King?
The Holy Prophet said that his Lord commanded him to have these qualities, saying, 'Unite with whoever breaks with you, and pardon whoever wrongs you; give to whoever deprives you, and be good to whoever is bad to you.' He commanded us to follow him when Allah said,
وَمَا آتَاكُمُ الرَّسُولُ فَخُذُوهُ وَمَا نَهَاكُمْ عَنْهُ فَانتَهُوا
Pardon is a secret of Allah in the heart of His select. Whoever is gladdened by it has made Him happy. The Messenger of Allah said, 'Is any of you capable of being like Abu Damdam?' 'O Messenger of Allah,' they said, 'Who is Abu Damdam?' The Holy Prophet replied, 'One of your ancestors who, when he woke up in the morning would say, "O Allah, I have forgiven the shattering of my honour by the common people." '