Language:
كتاب الجهاد والسير
56  
Fighting for the Cause of Allah (Jihaad)
(169)
Chapter: The killing of a captive
(169)
باب قَتْلِ الأَسِيرِ وَقَتْلِ الصَّبْرِ
Sahih al-Bukhari 3044
Narrated Anas bin Malik (ra):
Allah's Messenger (ﷺ) entered (Makkah) in the year of the Conquest (of Makkah) wearing a helmet over his head. After he took it off, a man came and said, "Ibn Khatal is clinging to the curtains of the Ka'bah." The Prophet (ﷺ) said, "Kill him."
حَدَّثَنَا إِسْمَاعِيلُ، قَالَ حَدَّثَنِي مَالِكٌ، عَنِ ابْنِ شِهَابٍ، عَنْ أَنَسِ بْنِ مَالِكٍ ـ رضى الله عنه أَنَّ رَسُولَ اللَّهِ صلى الله عليه وسلم دَخَلَ عَامَ الْفَتْحِ وَعَلَى رَأْسِهِ الْمِغْفَرُ، فَلَمَّا نَزَعَهُ جَاءَ رَجُلٌ فَقَالَ إِنَّ ابْنَ خَطَلٍ مُتَعَلِّقٌ بِأَسْتَارِ الْكَعْبَةِ، فَقَالَ ‏ "‏ اقْتُلُوهُ ‏"‏‏.‏
Reference : Sahih al-Bukhari 3044
In-book reference : Book 56, Hadith 250
USC-MSA web (English) reference : Vol. 4, Book 52, Hadith 280
  (deprecated numbering scheme)