[Machine] On the authority of the Prophet ﷺ , he said: "After that, what is the matter with a man killing another man while he says, 'I am a Muslim?' The killer said, 'O Messenger of Allah, he said it seeking refuge (from harm).' The Messenger of Allah ﷺ said: 'Thus did he utter it in a vain attempt to protect himself.' Then the Messenger of Allah ﷺ turned his face away from him. He said, 'Allah has forbidden the killing of a person who testifies that none has the right to be worshipped but Allah, and that I am the Messenger of Allah. Although he did not comment on it, Al-Dhahabi recognized it in his summary."
عَنِ النَّبِيِّ ﷺ أَنَّهُ قَالَ أَمَّا بَعْدَ فَمَا بَالُ الرَّجُلِ يَقْتُلُ الرَّجُلَ وَهُوَ يَقُولُ أَنَا مُسْلِمٌ؟ فَقَالَ الْقَاتِلُ يَا رَسُولَ اللَّهِ إِنَّمَا قَالَهَا مُتَعَوِّذًا فَقَالَ رَسُولُ اللَّهِ ﷺ هَكَذَا وَكَرِهَ مَقَالَتَهُ وَحَوَّلَ وَجْهَهُ عَنْهُ فَقَالَ «أَبَى اللَّهُ عَلَى مَنْ قَتَلَ مُسْلِمًا أَبَى اللَّهُ عَلَى مَنْ قَتَلَ مُسْلِمًا» سكت عنه الذهبي في التلخيص