When the Prophet ﷺ intended to perform ʿUmra in the month of Dhul-Qada, the people of Mecca did not let him enter Mecca 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, Messenger of Allah ﷺ agreed (to make peace).' They said, "We will not agree to this, for if we believed that you are Messenger of Allah ﷺ we would not prevent you, but you are Muhammad bin ʿAbdullah." The Prophet ﷺ said, "I am Messenger of Allah ﷺ and also Muhammad bin ʿAbdullah." Then he said to ʿAli, "Rub off (the words) 'Messenger of Allah ﷺ' ", but ʿAli said, "No, by Allah, I will never rub off your name." So, Messenger of Allah ﷺ took the document and wrote, 'This is what Muhammad bin ʿAbdullah has agreed upon: No arms will be brought into Mecca except in their cases, and nobody from the people of Mecca 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 Mecca if the latter wants to stay.' When the Prophet ﷺ entered Mecca and the time limit passed, the Meccans 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 Mecca. 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 uncle's daughter." Zaid and Jaʿfar quarreled about her. ʿAli said, "I have more right to her as she is my uncle's daughter." Jaʿfar said, "She is my uncle's daughter, and her aunt is my wife." Zaid said, "She is my brother's 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 Jaʿfar, "You resemble me both in character and appearance", and said to Zaid, "You are our brother (in faith) and our freed slave."
اعْتَمَرَ النَّبِيُّ ﷺ فِي ذِي الْقَعْدَةِ فَأَبَى أَهْلُ مَكَّةَ أَنْ يَدَعُوهُ يَدْخُلُ مَكَّةَ حَتَّى قَاضَاهُمْ عَلَى أَنْ يُقِيمَ بِهَا ثَلاَثَةَ أَيَّامٍ فَلَمَّا كَتَبُوا الْكِتَابَ كَتَبُوا هَذَا مَا قَاضَى عَلَيْهِ مُحَمَّدٌ رَسُولُ اللَّهِ ﷺ فَقَالُوا لاَ نُقِرُّ بِهَا فَلَوْ نَعْلَمُ أَنَّكَ رَسُولُ اللَّهِ مَا مَنَعْنَاكَ لَكِنْ أَنْتَ مُحَمَّدُ بْنُ عَبْدِ اللَّهِ قَالَ أَنَا رَسُولُ اللَّهِ وَأَنَا مُحَمَّدُ بْنُ عَبْدِ اللَّهِ ثُمَّ قَالَ لِعَلِيٍّ امْحُ رَسُولُ اللَّهِ قَالَ لاَ وَاللَّهِ لاَ أَمْحُوكَ أَبَدًا فَأَخَذَ رَسُولُ اللَّهِ ﷺ الْكِتَابَ فَكَتَبَ هَذَا مَا قَاضَى عَلَيْهِ مُحَمَّدُ بْنُ عَبْدِ اللَّهِ لاَ يَدْخُلُ مَكَّةَ سِلاَحٌ إِلاَّ فِي الْقِرَابِ وَأَنْ لاَ يَخْرُجَ مِنْ أَهْلِهَا بِأَحَدٍ إِنْ أَرَادَ أَنْ يَتَّبِعَهُ وَأَنْ لاَ يَمْنَعَ أَحَدًا مِنْ أَصْحَابِهِ أَرَادَ أَنْ يُقِيمَ بِهَا فَلَمَّا دَخَلَهَا وَمَضَى الأَجَلُ أَتَوْا عَلِيًّا فَقَالُوا قُلْ لِصَاحِبِكَ اخْرُجْ عَنَّا فَقَدْ مَضَى الأَجَلُ فَخَرَجَ النَّبِيُّ ﷺ فَتَبِعَتْهُمُ ابْنَةُ حَمْزَةَ يَا عَمِّ يَا عَمِّ فَتَنَاوَلَهَا عَلِيٌّ فَأَخَذَ بِيَدِهَا وَقَالَ لِفَاطِمَةَ عَلَيْهَا السَّلاَمُ دُونَكِ ابْنَةَ عَمِّكِ احْمِلِيهَا فَاخْتَصَمَ فِيهَا عَلِيٌّ وَزَيْدٌ وَجَعْفَرٌ فَقَالَ عَلِيٌّ أَنَا أَحَقُّ بِهَا وَهْىَ ابْنَةُ عَمِّي وَقَالَ جَعْفَرٌ ابْنَةُ عَمِّي وَخَالَتُهَا تَحْتِي وَقَالَ زَيْدٌ ابْنَةُ أَخِي فَقَضَى بِهَا النَّبِيُّ ﷺ لِخَالَتِهَا وَقَالَ الْخَالَةُ بِمَنْزِلَةِ الأُمِّ وَقَالَ لِعَلِيٍّ أَنْتَ مِنِّي وَأَنَا مِنْكَ وَقَالَ لِجَعْفَرٍ أَشْبَهْتَ خَلْقِي وَخُلُقِي وَقَالَ لِزَيْدٍ أَنْتَ أَخُونَا وَمَوْلاَنَا