Narrated Al-Bara:
When the Prophet (ﷺ) went out for the `Umra in the month of Dhal-Qa'da, the people of Mecca did not allow him to enter Mecca till he agreed to conclude a peace treaty with them by virtue of which he would stay in Mecca for three days only (in the following year). When the agreement was being written, the Muslims wrote: "This is the peace treaty, which Muhammad, Apostle of Allah has concluded." The infidels said (to the Prophet), "We do not agree with you on this, for if we knew that you are Apostle of Allah we would not have prevented you for anything (i.e. entering Mecca, etc.), but you are Muhammad, the son of `Abdullah." Then he said to `Ali, "Erase (the name of) 'Apostle of Allah'." `Ali said, "No, by Allah, I will never erase you (i.e. your name)." Then Allah's Messenger (ﷺ) took the writing sheet...and he did not know a better writing..and he wrote or got it the following written! "This is the peace treaty which Muhammad, the son of `Abdullah, has concluded: "Muhammad should not bring arms into Mecca except sheathed swords, and should not take with him any person of the people of Mecca even if such a person wanted to follow him, and if any of his companions wants to stay in Mecca, he should not forbid him." (In the next year) when the Prophet (ﷺ) entered Mecca and the allowed period of stay elapsed, the infidels came to `Ali and said "Tell your companion (Muhammad) to go out, as the allowed period of his stay has finished." So the Prophet (ﷺ) departed (from Mecca) and the daughter of Hamza followed him shouting "O Uncle, O Uncle!" `Ali took her by the hand and said...