The Muslim victory over the Meccans and their allies elevated their status among the tribes of Arabia. Numerous tribal chiefs were converting, and it seemed as if the Muslims would become strong enough to rival Mecca.
The following year, during the annual pilgrimage season in Arabia, the Prophet Muhammad ﷺ organized a group of 1,400 unarmed pilgrims to march to Mecca for religious rites. When the Meccans found out about the Muslim pilgrims, they were alarmed. They sent their cavalry to prevent the Muslims from entering the city, but Muslims took a different route and set up camp just outside Mecca. The Prophet ﷺ dispatched a man to inform the leaders that they did not come to fight but to visit the Ka’ba only. He also indicated that they wished to sign a peace treaty. The stunned idolaters sent representatives to Muhammad ﷺ, and the two sides hammered out a 10-year-long peace treaty called the Treaty of Hudaibiya. Both sides agreed to halt any hostilities and to rein in their allies. Although the Meccans stipulated that the Muslims could only begin making pilgrimages the following year, the Muslims returned to Medina with a new sense of security.
Unfortunately, the peace treaty was short-lived. A Meccan ally attacked a tribe allied to the Muslims and massacred them. This was a violation of the treaty of Ḥudaybiya and it later turned out that the Quraysh had supplied their ally with weapons to launch the attack. The Quraysh knew they were guilty so they sent Abu Sufyan to Madina to try and renegotiate a treaty. The Prophet was a man of his word and needed to help his allies.
A couple of weeks later, a force of over 10,000 Muslims marched upon Mecca. The Meccans surrendered peacefully. The next morning the Prophet Muhammad ﷺ led the victorious Muslims in a triumphal march into the city.
How would he deal with the leaders who had fought him, persecuted his followers, and attempted to kill him on several occasions?
By any standard of justice he could have had them punished. They called out to him, “What are you going to do with us?” He replied, “You are all forgiven today. Go back to your homes. You are all free.” Upon witnessing the leniency of the Prophet ﷺ, many Meccans embraced Islam. Then he entered the Kaʿba and had each and every single idol removed and destroyed.