Sahih Muslim Book 19, Hadith Number 4401.

Chapter : The treaty of Hudaibiya.

It has been narrated on the authority of al-Bara’ b. ‘Azib who said: ‘Ali b. Abu Talib penned the treaty between the Holy Prophet (may peace be upon him) 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 (may peace be upon him) said to ‘Ali: Strike out these words. He (Ali) said: I am not going to strike them out. So the Prophet (may peace be upon him) 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.