Sahih Bukhari | Volume 3 | Hadith Number 862
Narrated by Al-Bara bin 'Azib
When Allah's Apostle concluded a peace treaty with the people of Hudaibiya, Ali bin Abu Talib wrote the document and he mentioned in it, "Muhammad, Allah's Apostle." The pagans said, "Don't write: 'Muhammad, Allah's Apostle', for if you were an apostle we would not fight with you." Allah's Apostle asked Ali to rub it out, but Ali said, "I will not be the person to rub it out." Allah's Apostle rubbed it out and made peace with them on the condition that the Prophet and his companions would enter Mecca and stay there for three days, and that they would enter with their weapons in cases.