فَإِذَا لَقِيتُمُ ٱلَّذِينَ كَفَرُواْ فَضَرۡبَ ٱلرِّقَابِ حَتَّىٰٓ إِذَآ أَثۡخَنتُمُوهُمۡ فَشُدُّواْ ٱلۡوَثَاقَ فَإِمَّا مَنَّۢا بَعۡدُ وَإِمَّا فِدَآءً حَتَّىٰ تَضَعَ ٱلۡحَرۡبُ أَوۡزَارَهَاۚ ذَٰلِكَۖ وَلَوۡ يَشَآءُ ٱللَّهُ لَٱنتَصَرَ مِنۡهُمۡ وَلَٰكِن لِّيَبۡلُوَاْ بَعۡضَكُم بِبَعۡضٖۗ وَٱلَّذِينَ قُتِلُواْ فِي سَبِيلِ ٱللَّهِ فَلَن يُضِلَّ أَعۡمَٰلَهُمۡ ٤
Fa idhā laqītumul-ladhīna kafarū fadarbar-riqābi hattā idhā athkhantumūhum fashuddul-wathāqa fa immā mannā ba'du wa immā fidā'an hattā tada'al-harbu awzārahā dhālika walaw yashā'ullāhu lantasara minhum walākil liyabluwa ba'dakum biba'din walladhīna qutilū fī sabīlillāhi falan yudilla a'mālahum
So when you meet those who disbelieve [in battle], strike [their] necks until, when you have inflicted slaughter upon them, then secure [their] bonds,1494 and either [confer] favor1495 afterwards or ransom [them] until the war lays down its burdens.1496 That [is the command]. And if Allāh had willed, He could have taken vengeance upon them [Himself], but [He ordered armed struggle] to test some of you by means of others. And those who are killed in the cause of Allāh - never will He waste their deeds.
Footnotes
1494 i.e., take those remaining as captives.
1495 i.e., release them without ransom.
1496 i.e., its armor, machinery, etc., meaning "until the war is over."