Sahih al-Bukhari 4252
صحيح البخاري#4252SahihNarrated Ibn `Umar:Allah's Messenger (ﷺ) set out with the intention of performing `Umra, but the infidels of Quraish intervened between him and the Ka`ba, so the Prophet (ﷺ) slaughtered his Hadi (i.e. sacrificing animals and shaved his head at Al-Hudaibiya and concluded a peace treaty with them (i.e. the infidels) on condition that he would perform the `Umra the next year and that he would not carry arms against them except swords, and would not stay (in Mecca) more than what they would allow. So the Prophet (ﷺ) performed the `Umra in the following year and according to the peace treaty, he entered Mecca, and when he had stayed there for three days, the infidels ordered him to leave, and he left
Scholarly Authentication
We show the most cautious grade (weakest-wins) as the overall label. Individual scholars graded it as follows:
Every narration in Sahih al-Bukhari is accepted as Sahih (authentic) by the established status of the book.
In-book reference: 64:287