He said to the Messenger of Allah ﷺ, "Tell me, if I encounter a man from the disbelievers and we fight, and he strikes one of my hands with the sword and cuts it off, then takes refuge from me behind a tree and says, 'I have submitted to Allah,' should I kill him, Messenger of Allah, after he has said that?"The Messenger of Allah ﷺ replied, "Do not kill him."He said, "Messenger of Allah, he cut off one of my hands, and only said that after cutting it off."The Messenger of Allah ﷺ said, "Do not kill him. If you kill him, he holds the position you held before you killed him, and you hold the position he held before he spoke the words he uttered."
أنه قال لرسول الله ﷺ: أرأيت إن لقيت رجلا من الكفار، فاقتتلنا فضرب إحدى يدي بالسيف فقطعها ثم لاذمني بشجرة، فقال أسلمت الله. أ أقتله يا رسول الله بعد أن قالها؟ فقال رسول الله ﷺ: لا تقتله. فقال: يا رسول الله إنه قطع إحدى يدي، ثم قال ذلك بعد ما قطعها، فقال رسول الله ﷺ: لا تقتله فإن قتلته فإنه بمنزلتك قبل أن تقتله، وإنك بمنزلته قبل أن يقول كلمته التي قال.
Bukhari narrated it in "The Military Campaigns" (4019), and Muslim in "Faith" (95), through various routes from Zuhri, from Ata bin Yazid Laythi, from Ubaydullah bin Adi bin Khiyar, from Miqdad bin Aswad, who mentioned it.