Sahih al-Bukhari 4269: The Rulings of the Law Concern the Outward; the Inward Is Known Only to Allah
Hazrat Usamah bin Zaid (ra) relates: The Messenger of Allah (saw) sent us towards the tribe of Huraqah. We attacked those people early in the morning and defeated them, and a man of the Ansar and I pursued one of their men. When we had surrounded him, he began saying La ilaha illallah. (Hearing this) the Ansari held back, but I wounded him with my spear and killed him. When we came back and the news reached the Prophet (saw), he said: “O Usamah! Did you kill him after he had affirmed La ilaha illallah?” I said: “He was only protecting himself.” But he kept repeating the same words, until I wished that I had not become a Muslim before that day.
AI-translated by Islam-Today
Book 21: The Rulings of the Law Concern the Outward; the Inward Is Known Only to Allah