عَنِ ابْنِ عَبَّاسٍ رَضِيَ اللَّهُ عَنْهُمَا قَالَ مَرَّ نَفَرٌ مِنْ أَصْحَابِ النَّبِيِّ صَلَّى اللَّهُ عَلَيْهِ وَآلِهِ وَسَلَّمَ عَلَى رَجُلٍ مِنْ بَنِي سُلَيْمٍ مَعَهُ غَنَمٌ لَهُ فَسَلَّمَ عَلَيْهِمْ فَقَالُوا مَا سَلَّمَ عَلَيْكُمْ إِلَّا تَعَوُّذًا مِنْكُمْ فَعَمَدُوا إِلَيْهِ فَقَتَلُوهُ وَأَخَذُوا غَنَمَهُ فَأَتَوْا بِهَا النَّبِيَّ صَلَّى اللَّهُ عَلَيْهِ وَآلِهِ وَسَلَّمَ فَأَنْزَلَ اللَّهُ تَبَارَكَ وَتَعَالَى وَلَا تَقُولُوا لِمَنْ أَلْقَى إِلَيْكُمُ السَّلَامَ لَسْتَ مُؤْمِنًا تَبْتَغُونَ عَرَضَ الْحَيَاةِ الدُّنْيَا [سورة النساء: ٩٤] إِلَى آخِرِ الْآيَةِ
It is narrated from Sayyiduna Abdullah bin Abbas, may Allah be pleased with them both, that a group of the noble Companions passed by a man from Banu Sulaym who had some goats with him. He greeted the Companions with salam, but the Companions said: "He is only saying salam to seek protection from you." They killed him and took possession of his goats. When they brought those goats to the Noble Prophet, peace and blessings be upon him, Allah the Exalted revealed this verse: {وَلَا تَقُولُوْا لِمَنْ أَ لْقٰی إِلَیْکُمْ السَّلَامَ لَسْتَ مُؤْمِنًا تَبْتَغُونَ عَرَضَ الْحَیَاۃِ الدُّنْیَا} … And do not say to the one who offers you salam, "You are not a believer." You seek the goods of worldly life.