Prophet Muhammad was the most forgiving person. He was ever ready to forgive his enemies. When he went to Ta'if to preach God’s message to its people, they mistreated him. They abused him and hit him with stones. He left the city humiliated and wounded.
When he took shelter under a tree, God’s angel appeared to him and told him that God was very angry with the people of Taif and sent him to destroy them because they mistreated God’s beloved Prophet. The Prophet prayed to God to save the people of Ta’if, because what they did was out of their ignorance. He said: “O Allah, guide these people, because they did not know what they were doing.” (Al-Bukhari)
When he entered the city of Makkah after the victory, the Prophet had in front of him some of his staunchest enemies. Those who fought him for many years, persecuted his followers and killed many of them. Now he had full power to do whatever he wanted to punish them for their crimes.
It is reported that the Prophet asked them: “What do you think I shall do to you now” They expected nothing but retaliation and pleaded for mercy. The Prophet said, “Today I shall say to you what Joseph (referring to Prophet Yusuf -peace be upon him- as mentioned in the Qur'an, Yusuf 12:92) said to his brothers” “No blame on you today. Go, you are all free.” (Al-Albani)