A man from the Banu Sulaym tribe passed by a group of the companions of the Messenger of Allah ﷺ while he was driving along his sheep. He greeted them with peace, but they said, "He only greeted us to seek protection from us." So they set upon him, killed him, and brought his sheep to the Prophet ﷺ. Then this verse was revealed, "You who believe, when you go forth in the cause of Allah, verify carefully" [Nisa 4:94].
حدثنا يحيى بن أبي بكير حدثنا إسرائيل عن سماك عن عكرمة
مر رجل من بني سليم بنفر من أصحاب رسول الله ﷺ وهو يسوق غنما له فسلم عليهم فقالوا ما سلم علينا إلا ليتعوذ منا فعمدوا إليه فقتلوه وأتوا بغنمه النبي ﷺ فنزلت الآية {يا أيها الذين آمنوا إذا ضربتم في سبيل الله فتبينوا}