يَا أَيُّهَا الَّذِينَ آمَنُوا إِذَا ضَرَبْتُمْ فِي سَبِيلِ اللَّهِ فَتَبَيَّنُوا وَلَا تَقُولُوا لِمَنْ أَلْقَىٰ إِلَيْكُمُ السَّلَامَ لَسْتَ مُؤْمِنًا تَبْتَغُونَ عَرَضَ الْحَيَاةِ الدُّنْيَا فَعِندَ اللَّهِ مَغَانِمُ كَثِيرَةٌ ۚ كَذَٰلِكَ كُنتُم مِّن قَبْلُ فَمَنَّ اللَّهُ عَلَيْكُمْ فَتَبَيَّنُوا ۚ إِنَّ اللَّهَ كَانَ بِمَا تَعْمَلُونَ خَبِيرًا
“O believers! When you struggle in the cause of Allah, be sure of who you fight. And do not say to those who offer you [greetings of] peace, "You are no believer!" -- seeking a fleeting worldly gain. Instead, Allah has infinite bounties [in store]. You were initially like them, then Allah blessed you [with Islam]. So be sure! Indeed, Allah is All-Aware of what you do.”
Revealed rebuking the killing of Amir ibn al-Adbat al-Ashja'i after he offered the greeting of salam.