Sayyiduna al-Bara' (may Allah be pleased with him) says: The Messenger of Allah (peace and blessings be upon him) intended to perform Umrah in Dhu al-Qa'dah. The people of Makkah refused, saying that the Muslims could not enter Makkah until an agreement was made, the agreement being that the Muslims would not stay more than three days. When the agreement was written, the scribe wrote: This is the agreement settled by Muhammad, the Messenger of Allah (peace and blessings be upon him). The idolaters said: If we accepted you as the Messenger of Allah, what would the dispute be about? You are not the Messenger of Allah; rather, you are Muhammad bin Abdullah. He (peace and blessings be upon him) said: "I am the Messenger of Allah, and I am also the son of Abdullah." And he said: "O Ali! Erase the words 'Messenger of Allah'." Sayyiduna Ali (may Allah be pleased with him) said: By Allah! I will never erase it. He (peace and blessings be upon him) took the document and wrote on it: This is the agreement settled by Muhammad bin Abdullah: that they will not enter Makkah with weapons, except a sword, and that too in its sheath; that no one from the people of Makkah will go with the Muslims; and that if any Muslim wishes to stay with the people of Makkah, leaving the Muslims, he will not be prevented. When the Muslims had entered Makkah and the term was completed, the people of Makkah came to Sayyiduna Ali (may Allah be pleased with him) and said: Tell your companion to leave this place now. So the Messenger of Allah (peace and blessings be upon him) set out from Makkah, and the daughter of Sayyiduna Hamzah (may Allah be pleased with him) followed him, calling out: O uncle! O uncle! Sayyiduna Ali (may Allah be pleased with him) took hold of her and handed her over to Sayyidah Fatimah (may Allah be pleased with her). Then Sayyiduna Ali, Sayyiduna Zayd and Sayyiduna Ja'far (may Allah be pleased with them) disputed over her. Sayyiduna Ali (may Allah be pleased with him) said: I took hold of her, and she is the daughter of my paternal uncle. Sayyiduna Ja'far (may Allah be pleased with him) said: She is the daughter of my paternal uncle too, and her maternal aunt is married to me. Sayyiduna Zayd (may Allah be pleased with him) said: She is my brother's daughter. The Messenger of Allah (peace and blessings be upon him) ruled in favour of her maternal aunt and said: "The maternal aunt is in the position of the mother." He said to Sayyiduna Ali (may Allah be pleased with him): "You are from me and I am from you." He said to Sayyiduna Ja'far (may Allah be pleased with him): "You resemble me in appearance and in character." And he said to Sayyiduna Zayd (may Allah be pleased with him): "O Zayd! You are our brother and our mawla."
Imam Bukhari (may Allah have mercy on him) recorded it in his Sahih from Ubaydullah bin Musa.
Likewise, Ubaydullah bin Musa narrated it from Isra'il in a mudraj (interpolated) form.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب النفقات / 15768
Sayyiduna al-Bara' (may Allah be pleased with him) says: The Messenger of Allah (peace and blessings be upon him) stayed in Makkah for three days during Umrat al-Qada'. When it was the third day, the people of Makkah said to Sayyiduna Ali (may Allah be pleased with him): Today is the last day of the agreement, so tell your companion to leave. Sayyiduna Ali (may Allah be pleased with him) informed him (peace and blessings be upon him), and he (peace and blessings be upon him) said: "Yes." And then he left Makkah.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب النفقات / 15769
Sayyiduna Ali bin Abi Talib (may Allah be pleased with him) says: The daughter of Sayyiduna Hamzah (may Allah be pleased with him) came after us, calling out: "Uncle! Uncle!" I took hold of her and handed her over to Sayyidah Fatimah (may Allah be pleased with her). Then Sayyiduna Ali, Sayyiduna Zayd bin Harithah and Sayyiduna Ja'far (may Allah be pleased with them) disputed. Sayyiduna Ali (may Allah be pleased with him) said: I took hold of her, and she is the daughter of my paternal uncle. Sayyiduna Ja'far (may Allah be pleased with him) said: She is the daughter of my paternal uncle too, and her maternal aunt is married to me. Sayyiduna Zayd (may Allah be pleased with him) said: She is my brother's daughter. The Messenger of Allah (peace and blessings be upon him) ruled in favour of the maternal aunt and said: "The maternal aunt is in the position of the mother." He said to Sayyiduna Zayd (may Allah be pleased with him): "You are our brother and our mawla," and he hopped back on his feet. Then he said to Sayyiduna Ja'far (may Allah be pleased with him): "You resemble me most of all in appearance and character," and he too hopped on one foot behind Zayd. And he said to Sayyiduna Ali (may Allah be pleased with him): "You are from me and I am from you," and he went behind Sayyiduna Ja'far (may Allah be pleased with him). Sayyiduna Ali (may Allah be pleased with him) says: I said: O Messenger of Allah! Will you not marry the daughter of Sayyiduna Hamzah (may Allah be pleased with him)? He (peace and blessings be upon him) said: "She is the daughter of my foster brother." It is possible that in the narration of Abu Ishaq from al-Bara' the story of the daughter of Hamzah is abridged, and that it was then narrated in full from Sayyiduna Ali (may Allah be pleased with him), and that the story of hopping on the feet is in this narration only, not in the narration of al-Bara'.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب النفقات / 15770
Sayyiduna Ali (may Allah be pleased with him), relating the story of the daughter of Hamzah (may Allah be pleased with her), says: Sayyiduna Ja'far (may Allah be pleased with him) said: I have more right to her, since her maternal aunt is married to me. So he (peace and blessings be upon him) ruled in favour of Sayyiduna Ja'far (may Allah be pleased with him) and said: "Her maternal aunt is married to Ja'far (may Allah be pleased with him), and the maternal aunt is indeed a mother."
Likewise, this story is mentioned in Sunan Abi Dawud through different chains, but in our view this one is more correct.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب النفقات / 15771