Usama bin Zayd reported,

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

Muslim 278

Sahih

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

أسامة بن زيد بن حارثة

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

مسلم 278صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Muslim
Book
Faith
Chapter
Prohibition of killing a disbeliever after he says there is no god but Allah
Numbering
Darussalam 278
Muslim 278