'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.
سَمِعْتُ الْبَرَاءَ بْنَ عَازِبٍ يَقُولُ كَتَبَ عَلِيُّ بْنُ أَبِي طَالِبٍ الصُّلْحَ بَيْنَ النَّبِيِّ ﷺ وَبَيْنَ الْمُشْرِكِينَ يَوْمَ الْحُدَيْبِيَةِ فَكَتَبَ هَذَا مَا كَاتَبَ عَلَيْهِ مُحَمَّدٌ رَسُولُ اللَّهِ فَقَالُوا لاَ تَكْتُبْ رَسُولُ اللَّهِ فَلَوْ نَعْلَمُ أَنَّكَ رَسُولُ اللَّهِ لَمْ نُقَاتِلْكَ فَقَالَ النَّبِيُّ ﷺ لِعَلِيٍّ امْحُهُ فَقَالَ مَا أَنَا بِالَّذِي أَمْحَاهُ فَمَحَاهُ النَّبِيُّ ﷺ بِيَدِهِ قَالَ وَكَانَ فِيمَا اشْتَرَطُوا أَنْ يَدْخُلُوا مَكَّةَ فَيُقِيمُوا بِهَا ثَلاَثًا وَلاَ يَدْخُلُهَا بِسِلاَحٍ إِلاَّ جُلُبَّانَ السِّلاَحِ قُلْتُ لأَبِي إِسْحَاقَ وَمَا جُلُبَّانُ السِّلاَحِ قَالَ الْقِرَابُ وَمَا فِيهِ