"An infidel spy came to the Prophet (ﷺ) while he was on a journey. The spy sat with the companions of
the Prophet (ﷺ) and started talking and then went away. The Prophet (ﷺ) said (to his companions), 'Chase and
kill him.' So, I killed him." The Prophet (ﷺ) then gave him the belongings of the killed spy (in addition to
his share of the war booty).
Sahih al-Bukhari Book 56, Hadith 257