[Machine] The Messenger of Allah ﷺ performed the Umrah in the month of Dhul Qa'dah. The people of Makkah refused to allow him to enter Makkah until they settled the matter with him, which was for him to stay in Makkah for three days. When they wrote the document, they wrote: "This is what Muhammad, the Messenger of Allah, has ruled." They said, "We do not acknowledge this. If we knew that you were the Messenger of Allah, we would not have prevented you from anything. But you are Muhammad bin Abdullah." He said, "I am the Messenger of Allah and I am Muhammad bin Abdullah." Ali said, "Erase the title 'Messenger of Allah'." He said, "By Allah, I will never erase you." The Prophet ﷺ took the document, but he did not approve of writing. He wrote down instead, "This is what Muhammad bin Abdullah has ruled, that weapons are not to be brought into Makkah except for swords in their sheaths, and no one is to leave except those who wish to follow him. No one is to prevent any of his companions from staying in Makkah." When the time was up and he entered Makkah, they came to Ali and said, "Tell your companion to leave us, for the allotted time has passed." So the Messenger of Allah ﷺ left.
اعْتَمَرَ رَسُولُ اللهِ ﷺ فِي ذِي الْقَعْدَةِ فَأَبَى أَهْلُ مَكَّةَ أَنْ يَدْعُوهُ يَدْخُلُ مَكَّةَ حَتَّى قَاضَاهُمْ عَلَى أَنْ يُقِيمَ بِهَا ثَلَاثَةَ أَيَّامٍ فَلَمَّا كَتَبُوا الْكِتَابَ كَتَبُوا هَذَا مَا قَاضَى عَلَيْهِ مُحَمَّدٌ رَسُولُ اللهِ قَالُوا لَا نُقِرُّ بِهَذَا لَوْ نَعْلَمُ أَنَّكَ رَسُولُ اللهِ مَا مَنَعْنَاكَ شَيْئًا وَلَكِنْ أَنْتَ مُحَمَّدُ بْنُ عَبْدِ اللهِ قَالَ أَنَا رَسُولُ اللهِ وَأَنَا مُحَمَّدُ بْنُ عَبْدِ اللهِ قَالَ لِعَلِيٍّ امْحُ رَسُولُ اللهِ قَالَ وَاللهِ لَا أَمْحُوكَ أَبَدًا فَأَخَذَ النَّبِيُّ ﷺ الْكِتَابَ وَلَيْسَ يُحْسِنُ أَنْ يَكْتُبَ فَكَتَبَ مَكَانَ رَسُولُ اللهِ هَذَا مَا قَاضَى عَلَيْهِ مُحَمَّدُ بْنُ عَبْدِ اللهِ أَنْ لَا يُدْخِلَ مَكَّةَ السِّلَاحَ إِلَّا السَّيْفَ فِي الْقِرَابِ وَلَا يَخْرُجَ مِنْ أَهْلِهَا أَحَدٌ إِلَّا مَنْ أَرَادَ أَنْ يَتَّبِعَهُ وَلَا يَمْنَعَ أَحَدًا مِنْ أَصْحَابِهِ أَنْ يُقِيمَ بِهَا فَلَمَّا دَخَلَهَا وَمَضَى الْأَجَلُ أَتَوْا عَلِيًّا فَقَالُوا قُلْ لِصَاحِبِكَ فَلْيَخْرُجْ عَنَّا فَقَدْ مَضَى الْأَجَلُ فَخَرَجَ رَسُولُ اللهِ ﷺ