A spy from the polytheists came to the Prophet ﷺ while he was on a journey. He sat among the companions, talked with them, then slipped away. The Prophet ﷺ said, "Seek him out and kill him."So he killed him, and the Prophet ﷺ awarded him the spoils taken from the slain man.
أتى النبي ﷺ عين من المشركين، وهو في سفر، فجلس عند أصحابه يتحدث، ثم انفتل، فقال النبي ﷺ: اطلبوه واقتلوه، فقتله فنفله سلبه.
Bukhari related it in the Book of Jihad and Expeditions (3051), and Muslim in the Book of Jihad and Expeditions (1754:45), both from the hadith of Iyas bin Salama bin Akwa, from his father, who narrated it. The wording is Bukhari's, and it is found in Muslim in full length.In it, the Messenger of Allah said, "Who killed the man?" They said, "Ibn Akwa." He said, "He gets all of his spoils."