Sahih Muslim 95 a
It is narrated on the authority of Miqdad b. Aswad that he said. Messenger of Allah, you just see (here is a point):
If I encountered a person amongst the infidels (in the battlefield) and he attacked me and struck me and cut off one of my hands with the sword. Then he (in order to protect himself from me) took shelter of a tree and said: I become Muslim for Allah's sake. Messenger of Allah, can I kill him after he had uttered this? The Messenger of Allah (ﷺ) said: Do not kill him. I (the narrator) said: Messenger of Allah, he cut off my hand and uttered this after amputating it; should I then kill him? The Messenger of Allah (ﷺ) said: Don't kill him, for I you kill him, verily he would be in a position where you had been before killing him and verily you would be in a position where he had been before uttering (kalima).
حَدَّثَنَا قُتَيْبَةُ بْنُ سَعِيدٍ، حَدَّثَنَا لَيْثٌ، ح وَحَدَّثَنَا مُحَمَّدُ بْنُ رُمْحٍ، - وَاللَّفْظُ مُتَقَارِبٌ - أَخْبَرَنَا اللَّيْثُ، عَنِ ابْنِ شِهَابٍ، عَنْ عَطَاءِ بْنِ يَزِيدَ اللَّيْثِيِّ، عَنْ عُبَيْدِ اللَّهِ بْنِ عَدِيِّ بْنِ الْخِيَارِ، عَنِ الْمِقْدَادِ بْنِ الأَسْوَدِ، أَنَّهُ أَخْبَرَهُ أَنَّهُ، قَالَ يَا رَسُولَ اللَّهِ أَرَأَيْتَ إِنْ لَقِيتُ رَجُلاً مِنَ الْكُفَّارِ فَقَاتَلَنِي فَضَرَبَ إِحْدَى يَدَىَّ بِالسَّيْفِ فَقَطَعَهَا ‏.‏ ثُمَّ لاَذَ مِنِّي بِشَجَرَةٍ فَقَالَ أَسْلَمْتُ لِلَّهِ ‏.‏ أَفَأَقْتُلُهُ يَا رَسُولَ اللَّهِ بَعْدَ أَنْ قَالَهَا قَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم ‏"‏ لاَ تَقْتُلْهُ ‏"‏ ‏.‏ قَالَ فَقُلْتُ يَا رَسُولَ اللَّهِ إِنَّهُ قَدْ قَطَعَ يَدِي ثُمَّ قَالَ ذَلِكَ بَعْدَ أَنْ قَطَعَهَا أَفَأَقْتُلُهُ قَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم ‏"‏ لاَ تَقْتُلْهُ فَإِنْ قَتَلْتَهُ فَإِنَّهُ بِمَنْزِلَتِكَ قَبْلَ أَنْ تَقْتُلَهُ وَإِنَّكَ بِمَنْزِلَتِهِ قَبْلَ أَنْ يَقُولَ كَلِمَتَهُ الَّتِي قَالَ ‏"‏ ‏.‏