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 Messenger of Allah ﷺ 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 to Fatima, "Take the daughter of your uncle." So she made her ride (on her horse). (When they reached Medina) ʿAli, Zaid and Jaʿfar quarreled about her. ʿAli said, "I took her for she is the daughter of my uncle." Jaʿfar said, "She is the daughter of my uncle and her aunt is my wife." Zaid said, "She is the daughter of my brother." On that, the Prophet ﷺ gave her to her aunt and said, "The aunt is of the same status as the mother." He then said to ʿAli, "You are from me, and I am from you," and said to Jaʿfar, "You resemble me in appearance and character," and said to Zaid, "You are our brother and our freed slave." ʿAli said to the Prophet 'Won't you marry the daughter of Hamza?" The Prophet ﷺ said, "She is the daughter of my foster brother." (Using translation from Bukhārī 4251)
اعْتَمَرَ رَسُولُ اللهِ ﷺ فِي ذِي الْقَعْدَةِ فَأَبَى أَهْلُ مَكَّةَ أَنْ يَدَعُوهُ يَدْخُلُ مَكَّةَ حَتَّى قَاضَاهُمْ عَلَى أَنْ يُقِيمَ فِيهَا ثَلَاثَةَ أَيَّامٍ فَلَمَّا كَتَبُوا الْكِتَابَ كَتَبُوا هَذَا مَا قَاضَى عَلَيْهِ مُحَمَّدٌ رَسُولُ اللهِ قَالُوا لَا نُقِرُّ بِهَا لَوْ نَعْلَمُ أَنَّكَ رَسُولُ اللهِ مَا مَنَعْنَاكَ بَيْتَهُ وَلَكِنْ أَنْتَ مُحَمَّدُ بْنُ عَبْدِ اللهِ قَالَ أَنَا رَسُولُ اللهِ وَأنا مُحَمَّدُ بْنُ عَبْدِ اللهِ قَالَ لِعَلِيٍّ «امْحُ رَسُولَ اللهِ ﷺ» قَالَ «وَاللهِ لَا أَمْحُوكَ أَبَدًا فَأَخَذَ رَسُولُ اللهِ ﷺ الْكِتَابَ وَلَيْسَ يُحْسِنُ يَكْتُبُ فَكَتَبَ مَكَانَ رَسُولِ اللهِ ﷺ مُحَمَّدًا فَكَتَبَ هَذَا مَا قَاضَى عَلَيْهِ مُحَمَّدُ بْنُ عَبْدِ اللهِ لَا يَدْخُلُ مَكَّةَ سِلَاحٌ إِلَّا السَّيْفَ فِي الْقِرَابِ وَأَنْ لَا يَخْرُجَ مِنْ أَهْلِهَا بِأَحَدٍ إِنْ أَرَادَ أَنْ يُتْبِعَهُ وَأَنْ لَا يَمْنَعَ أَحَدًا مِنْ أَصْحَابِهِ إِنْ أَرَادَ أَنْ يُقِيمَ» فَلَمَّا دَخَلَهَا وَمَضَى الْأَجَلُ أَتَوْا عَلِيًّا فَقَالُوا قُلْ لِصَاحِبِكَ فَلْيَخْرُجْ عَنَّا فَقَدْ مَضَى الْأَجَلُ فَخَرَجَ رَسُولُ اللهِ ﷺ فَتَبِعَتْهُ ابْنَةُ حَمْزَةَ تُنَادِي يَا عَمُّ يَا عَمُّ فَتَنَاوَلَهَا عَلِيٌّ فَأَخَذَ بِيَدِهَا فَقَالَ لِفَاطِمَةَ «دُونَكِ ابْنَةَ عَمِّكِ فَحَمَلَتْهَا فَاخْتَصَمَ فِيهَا عَلِيٌّ وَزِيدٌ وَجَعْفَرٌ» فَقَالَ عَلِيٌّ «أَنَا آخُذُهَا وَهِيَ ابْنَةُ عَمِّي» وَقَالَ جَعْفَرٌ «ابْنَةُ عَمِّي وَخَالَتُهَا تَحْتِي» وَقَالَ زَيْدٌ «ابْنَةُ أَخِي فَقَضَى بِهَا رَسُولُ اللهِ ﷺ لِخَالَتِهَا» وَقَالَ «الْخَالَةُ بِمَنْزِلَةِ الْأُمِّ» ثُمَّ قَالَ لِعَلِيٍّ «أَنْتَ مِنِّي وَأَنَا مِنْكَ» وَقَالَ لِجَعْفَرٍ «أَشْبَهْتَ خَلْقِي وَخُلُقِي» ثُمَّ قَالَ لِزَيْدٍ «أَنْتَ أَخُونَا وَمَوْلَانَا» فَقَالَ عَلِيٌّ «أَلَا تَتَزَوَّجُ ابْنَةَ حَمْزَةَ؟» فَقَالَ «إِنَّهَا ابْنَةُ أَخِي مِنَ الرَّضَاعَةِ» خَالَفَهُ يَحْيَى بْنُ آدَمَ فَرَوَى آخَرُ هَذَا الْحَدِيثَ عَنْ إِسْرَائِيلَ عَنْ أَبِي إِسْحَاقَ عَنْ هَانِئٍ وَهُبَيْرَةَ بْنِ يَرِيمَ عَنْ عَلِيٍّ