Sahih Muslim , Hadith 1783

It has been narrated on the authority of al-Bara' b. 'Azib who said: 'Ali b. Abu Talib penned the treaty between the Prophet and the polytheists on the Day of Hudaibiya. He wrote: This is what Muhammad, the Messenger of Allah, has settled. They (the polytheists) said: Do not write words" the Messenger of Allah". If we knew that you were the Messenger of Allah, we would not fight against you. The Prophet said to 'Ali: Strike out these words. He (Ali) said: I am not going to strike them out. So the Prophet struck them out with his own hand. The narrator said that the conditions upon which the two sides had agreed included that the Muslims would enter Mecca (next year) and would stay there for three days, and that they would not enter bearing arms except in their sheaths or bolsters.

حَدَّثَنِي عُبَيْدُ اللَّهِ بْنُ مُعَاذٍ الْعَنْبَرِيُّ، حَدَّثَنَا أَبِي، حَدَّثَنَا شُعْبَةُ، عَنْ أَبِي إِسْحَاقَ، قَالَ سَمِعْتُ الْبَرَاءَ بْنَ عَازِبٍ، يَقُولُ كَتَبَ عَلِيُّ بْنُ أَبِي طَالِبٍ الصُّلْحَ بَيْنَ النَّبِيِّ صلى الله عليه وسلم وَبَيْنَ الْمُشْرِكِينَ يَوْمَ الْحُدَيْبِيَةِ فَكَتَبَ ‏"‏ هَذَا مَا كَاتَبَ عَلَيْهِ مُحَمَّدٌ رَسُولُ اللَّهِ‏"‏ ‏.‏ فَقَالُوا لاَ تَكْتُبْ رَسُولُ اللَّهِ فَلَوْ نَعْلَمُ أَنَّكَ رَسُولُ اللَّهِ لَمْ نُقَاتِلْكَ ‏.‏ فَقَالَ النَّبِيُّ صلى الله عليه وسلم لِعَلِيٍّ ‏"‏ امْحُهُ ‏"‏ ‏.‏ فَقَالَ مَا أَنَا بِالَّذِي أَمْحَاهُ ‏.‏ فَمَحَاهُ النَّبِيُّ صلى الله عليه وسلم بِيَدِهِ قَالَ وَكَانَ فِيمَا اشْتَرَطُوا أَنْ يَدْخُلُوا مَكَّةَ فَيُقِيمُوا بِهَا ثَلاَثًا وَلاَ يَدْخُلُهَا بِسِلاَحٍ إِلاَّ جُلُبَّانَ السِّلاَحِ ‏.‏ قُلْتُ لأَبِي إِسْحَاقَ وَمَا جُلُبَّانُ السِّلاَحِ قَالَ الْقِرَابُ وَمَا فِيهِ ‏.‏

sunnah.com

It has been narrated on the authority of Abu Ishaq, who heard Bars' b. Azib say: When the Messenger of Allah made peace with the people of Hudaibiya, 'Ali drew up the agreement between them, and so he wrote: Muhammad, the Messenger of Allah. (This is followed by the same wording as we have in the previous tradition except the omission of the words: This is what he has settled.)

حَدَّثَنَا مُحَمَّدُ بْنُ الْمُثَنَّى، وَابْنُ، بَشَّارٍ قَالاَ حَدَّثَنَا مُحَمَّدُ بْنُ جَعْفَرٍ، حَدَّثَنَا شُعْبَةُ، عَنْ أَبِي إِسْحَاقَ، قَالَ سَمِعْتُ الْبَرَاءَ بْنَ عَازِبٍ، يَقُولُ لَمَّا صَالَحَ رَسُولُ اللَّهِ صلى الله عليه وسلم أَهْلَ الْحُدَيْبِيَةِ كَتَبَ عَلِيٌّ كِتَابًا بَيْنَهُمْ قَالَ فَكَتَبَ ‏"‏ مُحَمَّدٌ رَسُولُ اللَّهِ ‏"‏ ثُمَّ ذَكَرَ بِنَحْوِ حَدِيثِ مُعَاذٍ غَيْرَ أَنَّهُ لَمْ يَذْكُرْ فِي الْحَدِيثِ ‏"‏ هَذَا مَا كَاتَبَ عَلَيْهِ ‏"‏ ‏.‏

sunnah.com

It has been narrated on the authority of Bara' who said: When the Prophet was checked from going to the Ka'ba, the people of Mecca made peace with him'on the condition that he would (be allowed to) enter Mecca (next year) and stay there for three days, that he would not enter (the city) except with swords in their sheaths and arms encased in their covers, that he would not take eway with him anyone from its dwellers, nor would he prevent anyone from those with him to stay on in Mecca (if he so desired). He said to 'Ali: Write down the terms settled between us. (So 'Ali wrote): In the name of Allah, most Gracious and most Merciful. This is what Muhammad, the Messenger of Allah, has settled (with the Meccans), The polytheists said to him: If we knew that thou art the Messenger of of Allah, we would follow you. But write: Muhammad b. 'Abdullah. So he told 'Ali to strike out these words. 'Ali said: No, by Allah, I will not strike them out. The Messenger of Allah (may Peace be upon him) said: Show me their place (on the parchment). So he ('Ali) showed him their place and he (the Holy Prophet) struck them out; and 'Ali wrote: Ibn 'Abdullah. (According to the terms of the treaty, next year) the Prophet stayed there for three days When it was the third day, they said to 'Ali: This is the last day according to the terms of your companion. So tell him to leave. 'Ali informed the Prophet accordingly. He said: Yes, and left (the city). Ibn Janab in his version of the tradition used:" we would swear allegiance to you" instead of" we would follow you".

حَدَّثَنَا إِسْحَاقُ بْنُ إِبْرَاهِيمَ الْحَنْظَلِيُّ، وَأَحْمَدُ بْنُ جَنَابٍ الْمِصِّيصِيُّ، جَمِيعًا عَنْ عِيسَى بْنِ يُونُسَ، - وَاللَّفْظُ لإِسْحَاقَ - أَخْبَرَنَا عِيسَى بْنُ يُونُسَ، أَخْبَرَنَا زَكَرِيَّاءُ، عَنْ أَبِي إِسْحَاقَ، عَنِ الْبَرَاءِ، قَالَ لَمَّا أُحْصِرَ النَّبِيُّ صلى الله عليه وسلم عِنْدَ الْبَيْتِ صَالَحَهُ أَهْلُ مَكَّةَ عَلَى أَنْ يَدْخُلَهَا فَيُقِيمَ بِهَا ثَلاَثًا وَلاَ يَدْخُلَهَا إِلاَّ بِجُلُبَّانِ السِّلاَحِ السَّيْفِ وَقِرَابِهِ ‏.‏ وَلاَ يَخْرُجَ بِأَحَدٍ مَعَهُ مِنْ أَهْلِهَا وَلاَ يَمْنَعَ أَحَدًا يَمْكُثُ بِهَا مِمَّنْ كَانَ مَعَهُ ‏.‏ قَالَ لِعَلِيٍّ ‏"‏ اكْتُبِ الشَّرْطَ بَيْنَنَا بِسْمِ اللَّهِ الرَّحْمَنِ الرَّحِيمِ هَذَا مَا قَاضَى عَلَيْهِ مُحَمَّدٌ رَسُولُ اللَّهِ ‏"‏ ‏.‏ فَقَالَ لَهُ الْمُشْرِكُونَ لَوْ نَعْلَمُ أَنَّكَ رَسُولُ اللَّهِ تَابَعْنَاكَ وَلَكِنِ اكْتُبْ مُحَمَّدُ بْنُ عَبْدِ اللَّهِ ‏.‏ فَأَمَرَ عَلِيًّا أَنْ يَمْحَاهَا فَقَالَ عَلِيٌّ لاَ وَاللَّهِ لاَ أَمْحَاهَا ‏.‏ فَقَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم ‏"‏ أَرِنِي مَكَانَهَا ‏"‏ ‏.‏ فَأَرَاهُ مَكَانَهَا فَمَحَاهَا وَكَتَبَ ‏"‏ ابْنُ عَبْدِ اللَّهِ ‏"‏ ‏.‏ فَأَقَامَ بِهَا ثَلاَثَةَ أَيَّامٍ فَلَمَّا أَنْ كَانَ يَوْمُ الثَّالِثِ قَالُوا لِعَلِيٍّ هَذَا آخِرُ يَوْمٍ مِنْ شَرْطِ صَاحِبِكَ فَأْمُرْهُ فَلْيَخْرُجْ ‏.‏ فَأَخْبَرَهُ بِذَلِكَ فَقَالَ ‏"‏ نَعَمْ ‏"‏ ‏.‏ فَخَرَجَ ‏.‏ وَقَالَ ابْنُ جَنَابٍ فِي رِوَايَتِهِ مَكَانَ تَابَعْنَاكَ بَايَعْنَاكَ ‏.‏

sunnah.com