(48) باب أَيْنَ رَكَزَ النَّبِيُّ صلى الله عليه وسلم الرَّايَةَ يَوْمَ الْفَتْحِ
Narrated Anas bin Malik:
On the day of the Conquest, the Prophet (ﷺ) entered Mecca, wearing a helmet on his head. When he took it off, a man came and said, "Ibn Khatal is clinging to the curtain of the Ka`ba." The Prophet (ﷺ) said, "Kill him." (Malik a sub-narrator said, "On that day the Prophet (ﷺ) was not in a state of Ihram as it appeared to us, and Allah knows better.")
Reference: Sahih al-Bukhari 4286
In-book reference: Book 64, Hadith 319
USC-MSA web (English) reference(deprecated numbering scheme): Vol. 5, Book 59, Hadith 582