Sahih al-Bukhari 4252
Muhammad bin Rafi' narrated to me that Suraij (bin Nu'man) told us that Fulaih (bin Sulaiman) narrated to us. (Another chain:) And Muhammad bin Husain bin Ibrahim told me. He said: My father narrated to me that Fulaih bin Sulaiman told us. He narrated from Nafi', Nafi' from (Hazrat Abdullah) bin Umar (ra) that the Messenger of Allah (saw) set out (from Medina) with the intention of Umrah. But the disbelievers of the Quraish became an obstacle between him and the House of Allah. He (saw) slaughtered his sacrificial animal at Hudaibiyah and shaved his head, and agreed with them that he would perform the Umrah the next year and would not come with any weapons except swords, and that he would stay in Mecca only as long as they wished. So the next year he came with the intention of Umrah and entered Mecca in the way on which he had made peace with them. When he had stayed there three days, the Quraish told him to leave (Mecca), and he went back (from Mecca).
AI-translated by Islam-Today