Sunan an-Nasa'i, Hadith 3979 ⓘ
It was narrated that An-Nu'man bin Bashir said: "We were with the Messenger of Allah [SAW] and a man came and whispered to him. He said: 'Kill him.' Then he said: 'Does he bear witness to La ilaha illallah (there is none worthy of worship except Allah)?' He said: 'Yes, but he is only saying it to protect himself.' The Messenger of Allah [SAW] said: 'Do not kill him, for I have been commanded to fight the people until they say La ilaha illallah, and if they say it, their blood and their wealth are safe from me, except for a right that is due, and their reckoning will be with Allah.'"
أَخْبَرَنَا مُحَمَّدُ بْنُ عَبْدِ اللَّهِ بْنِ الْمُبَارَكِ، قَالَ حَدَّثَنَا الأَسْوَدُ بْنُ عَامِرٍ، قَالَ حَدَّثَنَا إِسْرَائِيلُ، عَنْ سِمَاكٍ، عَنِ النُّعْمَانِ بْنِ بَشِيرٍ، قَالَ كُنَّا مَعَ النَّبِيِّ صلى الله عليه وسلم فَجَاءَ رَجُلٌ فَسَارَّهُ فَقَالَ " اقْتُلُوهُ " . ثُمَّ قَالَ " أَيَشْهَدُ أَنْ لاَ إِلَهَ إِلاَّ اللَّهُ " . قَالَ نَعَمْ وَلَكِنَّمَا يَقُولُهَا تَعَوُّذًا . فَقَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم " لاَ تَقْتُلُوهُ فَإِنَّمَا أُمِرْتُ أَنْ أُقَاتِلَ النَّاسَ حَتَّى يَقُولُوا لاَ إِلَهَ إِلاَّ اللَّهُ فَإِذَا قَالُوهَا عَصَمُوا مِنِّي دِمَاءَهُمْ وَأَمْوَالَهُمْ إِلاَّ بِحَقِّهَا وَحِسَابُهُمْ عَلَى اللَّهِ " .
also referenced under: Book 37, Hadith 14 (In-Book) & Volume 5, Book 37, Hadith 3984 (DarusSalam)