Usama bin Zayd reported,

The Messenger of Allah ﷺ sent us on an expedition against the Huraqah. We attacked the people at dawn and routed them. A man from the Ansar and I caught up with one of their men, and when we closed in on him, he said, "There is no god but Allah." The Ansari held back, but I struck him with my spear and killed him.When we returned, news of this reached the Prophet ﷺ, and he said, "Usama, did you kill him after he said, 'There is no god but Allah'?"I said, "He only said it to save himself."But he kept repeating the question until I wished I had not become a Muslim before that day.

Bukhari 4269

Sahih

حدثني عمرو بن محمد حدثنا هشيم أخبرنا حصين أخبرنا أبو ظبيان قال سمعت

أسامة بن زيد رضي الله عنهما يقول

بعثنا رسول الله ﷺ إلى الحرقة فصبحنا القوم فهزمناهم ولحقت أنا ورجل من الأنصار رجلا منهم فلما غشيناه قال لا إله إلا الله فكف الأنصاري فطعنته برمحي حتى قتلته فلما قدمنا بلغ النبي ﷺ فقال يا أسامة أقتلته بعد ما قال لا إله إلا الله قلت كان متعوذا فما زال يكررها حتى تمنيت أني لم أكن أسلمت قبل ذلك اليوم

البخاري 4269صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Bukhari
Book
Expeditions
Chapter
Prophet ﷺ sending Usama bin Zayd to Huraqat of Juhayna
Numbering
Darussalam 4269
Bukhari 4269