Riyad as-Salihin 396: On Judging People in respect of their Overt Conduct
Usamah ibn Zaid relates: The Holy Prophet sent us on a scouting expedition to Huraqah, a valley of the Juhnah, and we arrived at its springs in the morning. A man of the Ansar and I came upon one of their men and when we had covered him he called out: There is none worthy of worship save Allah. On this the Ansari held back, but I finished him off with my spear. When we returned to Medina, this incident came to the knowledge of the Holy Prophet. He asked me: Usamah, did you kill him after he had affirmed: There is none worthy of worship save Allah? I said: Messenger of Allah (saw), he made the affirmation only to save himself. He said again: Did you kill him after he had affirmed: There is none worthy of worship save Allah? He went on repeating it till I wished I had not accepted Islam before that day (Bokhari and Muslim). Another version is: The Holy Prophet said: Did he affirm: There is none worthy of worship save Allah; and yet you killed him? I said: Messenger of Allah (saw), he said it out of fear of our arms. He said: Why did you not cleave his heart to discover whether he had said it from his heart or not? He kept repeating it till I wished I had accepted Islam only that day.
وفي رواية: فقال رسول الله صلى الله عليه وسلم "أقال : لا إله إلا الله وقتلته؟! قلت: يا رسول الله، إنما قالها خوفاً من السلاح، قال: "أفلا شققت عن قلبه حتى تعلم أقالها أم لا؟!" فما زال يكررها حتى تمنيت أني أسلمت يومئذ.