Narrated Al-Bara (RA):
When the Prophet ﷺ intended to perform Umra in the month of Dhul-Qada, the people of Makkah did not let him enter Makkah till he settled the matter with them by promising to stay in it for three days only. When the document of treaty was written, the following was mentioned: These are the terms on which Muhammad, Allahs Apostle ﷺ agreed (to make peace). They said, "We will not agree to this, for if we believed that you are Allahs Apostle ﷺ we would not prevent you, but you are Muhammad bin Abdullah." The Prophet ﷺ said, "I am Allahs Apostle ﷺ and also Muhammad bin Abdullah." Then he said to Ali, "Rub off (the words) Allahs Apostle ", but Ali said, "No, by Allah, I will never rub off your name." So, Allahs Apostle ﷺ took the document and wrote, This is what Muhammad bin Abdullah has agreed upon: No arms will be brought into Makkah except in their cases, and nobody from the people of Makkah will be allowed to go with him (i.e. the Prophet) even if he wished to follow him and he (the Prophet) will not prevent any of his companions from staying in Makkah if the latter wants to stay. When the Prophet ﷺ entered Makkah and the time limit passed, the Makkahns went to Ali and said, "Tell your Friend (i.e. the Prophet) to go out, as the period (agreed to) has passed." So, the Prophet ﷺ went out of Makkah. The daughter of Hamza ran after them (i.e. the Prophet ﷺ and his companions), calling, "O Uncle! O Uncle!" Ali received her and led her by the hand and said to Fatima, "Take your uncles daughter." Zaid and Jafar quarrel ed about her. Ali said, "I have more right to her as she is my uncles daughter." Jafar said, "She is my uncles daughter, and her aunt is my wife." Zaid said, "She is my brothers daughter." The Prophet ﷺ judged that she should be given to her aunt, and said that the aunt was like the mother. He then said to All, "You are from me and I am from you", and said to Jafar, "You resemble me both in character and appearance", and said to Zaid, "You are our brother (in faith) and our freed slave."