Jundab bin Abdullah reported,

During the time of Ibn Zubayr's strife, he sent for Asas bin Salamah and said, "Gather for me a group of your brothers so I may speak to them." So Asas sent a messenger to them.When they had assembled, Jundab came wearing a yellow hooded cloak and said, "Continue with what you were discussing." The conversation went around, and when the turn came to him, he pulled the hood back from his head and said, "I have come to you not intending to inform you about your Prophet, but the Messenger of Allah ﷺ once sent a contingent of Muslims against a group of polytheists. They met in battle, and there was a man among the polytheists who, whenever he wished to target a Muslim, would go after him and kill him. Then a man among the Muslims sought to catch him off guard."He said, "We used to be told that this man was Usama bin Zayd. When he raised the sword over him, the man said, 'There is no god but Allah,' but he killed him anyway. The bearer of news came to the Prophet ﷺ, who questioned him, and he reported to him what had happened, including the account of this man and what he had done. So the Prophet ﷺ summoned him and asked him, 'Why did you kill him?'"He said, "Messenger of Allah, he had inflicted heavy losses on the Muslims and killed so-and-so and so-and-so," naming several men. "I charged at him, and when he saw the sword, he said, 'There is no god but Allah.'"The Messenger of Allah ﷺ said, "Did you kill him?"He answered, "Yes."The Prophet said, "What will you do with 'There is no god but Allah' when it comes on the Day of Resurrection?"He said, "Messenger of Allah, ask forgiveness for me."The Prophet replied, "What will you do with 'There is no god but Allah' when it comes on the Day of Resurrection?"He kept saying nothing more than, "What will you do with 'There is no god but Allah' when it comes on the Day of Resurrection?"

Azami 195

Sahih

عن جندب بن عبد الله البجلي

أنه بعث إلى عسعس بن سلامة زمن فتنة ابن الزبير، فقال: اجمع لي نفرا من إخوانك حتى أحدثهم فبعث رسولا إليهم. فلما اجتمعوا جاء جندب وعليه برنس أصفر فقال: تحدثوا بما كنتم تحدثون به حتى دار الحديث. فلما دار الحديث إليه، حسر البرنس عن رأسه فقال: إني أتيتكم ولا أريد أن أخبركم عن نبيكم، إن رسول الله ﷺ بعث بعثا من المسلمين إلى قوم من المشركين وأنهم التقوا فكان رجل من المشركين إذا شاء أن يقصد إلى رجل من المسلمين قصد له فقتله، وإن رجلا من المسلمين قصد غفلته- قال: وكنا نحدث أنه أسامة بن زيد- فلما رفع عليه السيف قال: لا إله إلا الله فقتله! فجاء البشير إلى النبي ﷺ فسأله فأخبره حتى أخبره خبر الرجل كيف صنع، فدعاه فسأله فقال: لم قتلته؟ قال: يا رسول الله أوجع في المسلمين، وقتل فلانا وفلانا وسمى له نفرا، وإني حملت عليه. فلما رأى السيف قال: لا إله إلا الله! قال رسول الله ﷺ: أقتلته؟ قال: نعم قال: فكيف تصنع بلا إله إلا الله إذا جاءت يوم القيامة؟ قال يا رسول الله استغفر لي. قال: وكيف تصنع بلا إله إلا الله إذا جاءت يوم القيامة؟ قال: فجعل لا يزيده على أن يقول: كيف تصنع بلا إله إلا الله إذا جاءت يوم القيامة؟

الأعظمي 195صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Faith
Chapter
Qualities of faith
Section
Prohibition of killing a disbeliever after he says there is no god but Allah, even if he had harmed the Muslims
Numbering
Jami al-Kamil 195 (2nd edition)
Azami 195