The Messenger of Allah ordered that he be killed. He had been a spy for Abu Sufyan and was an ally of a man from the Ansar. He passed by a gathering of the Ansar and said, "I am a Muslim."A man from the Ansar said, "Messenger of Allah, he is saying, 'I am a Muslim.'"The Messenger of Allah ﷺ replied, "Among you are Some men whose faith we entrust to them. Furat bin Hayan is one of them."
أن رسول الله أمر بقتله، وكان عينا لأبي سفيان، وكان حليفا لرجل من الأنصار، فمر بحلقة من الأنصار، فقال إني مسلم. فقال رجل من الأنصار: يا رسول الله إنه يقول: إني مسلم. فقال رسول الله ﷺ: إن منكم رجالا نكلهم إلى إيمأنهم منهم فرات بن حيان.
Reported by Abu Dawud (2652), Ahmad (18965), Ibn Jarud (1058), and Hakim (2/115 and 4/366), all of them through various routes from Sufyan Thawri, from Abu Ishaq, from Haritha bin Mudarrib, from Furat bin Hayan, who mentioned it. Its isnad is sahih. Hakim said, "A hadith sahih according to the criteria of the two Shaykhs (Bukhari and Muslim)." He also said, "A hadith sahih in isnad."I say, this latter statement is the correct one, for Haritha bin Mudarrib was not narrated from by the two Shaykhs, nor by either of them individually.There is no disagreement about killing a spy if he is a disbeliever, but they differed regarding killing a spy if he is a Muslim. Shafii held the view that he is not to be killed, but rather disciplined, and if he is a person of standing, he may be pardoned, following the example of the Prophet ﷺ with Hatib bin Abu Balta. Abu Hanifa held the view that he should be imprisoned for a long time. Malik and most of his companions held the view that he should be killed, because his harm extends to others, and it serves as a deterrent to others.However, the correct view is that the ruling regarding a spy is left to the judgment of the ruler, since it concerns the security of the state, and the ruler is the one who safeguards the state's security and is best aware of its interests.