يَـٰٓأَيُّهَا ٱلَّذِينَ ءَامَنُوٓا۟ إِذَا ضَرَبْتُمْ فِى سَبِيلِ ٱللَّهِ فَتَبَيَّنُوا۟ وَلَا تَقُولُوا۟ لِمَنْ أَلْقَىٰٓ إِلَيْكُمُ ٱلسَّلَـٰمَ لَسْتَ مُؤْمِنًا تَبْتَغُونَ عَرَضَ ٱلْحَيَوٰةِ ٱلدُّنْيَا فَعِندَ ٱللَّهِ مَغَانِمُ كَثِيرَةٌ ۚ كَذَٰلِكَ كُنتُم مِّن قَبْلُ فَمَنَّ ٱللَّهُ عَلَيْكُمْ فَتَبَيَّنُوٓا۟ ۚ إِنَّ ٱللَّهَ كَانَ بِمَا تَعْمَلُونَ خَبِيرًا
yāayyuhā alladhīna āmanū idhā ḍarabtum fī sabīli l-lahi fatabayyanū walā taqūlū liman alqā ilaykumu l-salāma lasta mu'minan tabtaghūna ʿaraḍa l-ḥayati l-dun'yā faʿinda l-lahi maghānimu kathīratun kadhālika kuntum min qablu famanna l-lahu ʿalaykum fatabayyanū inna l-laha kāna bimā taʿmalūna khabīran
So, you who believe, be careful when you go to fight in God’s way, and do not say to someone who offers you a greeting of peace, ‘You are not a believer,’ out of desire for the chance gains of this life- God has plenty of gains for you. You yourself were in the same position [once], but God was gracious to you, so be careful: God is fully aware of what you do.
O you who believe! When you go (to fight) in the Cause of Allâh, verify (the truth), and say not to anyone who greets you (by embracing Islâm): "You are not a believer"; seeking the perishable goods of the worldly life. There are much more profits and booties with Allâh. Even as he is now, so were you yourselves before till Allâh conferred on you His Favours (i.e. guided you to Islâm), therefore, be cautious in discrimination. Allâh is Ever Well-Aware of what you do.