So when you meet the disbelievers ˹in battle˺, strike ˹their˺ necks until you have thoroughly subdued them, then bind them firmly. Later ˹free them either as˺ an act of grace or by ransom until the war comes to an end. So will it be. Had Allah willed, He ˹Himself˺ could have inflicted punishment on them. But He does ˹this only to˺ test some of you by means of others. And those who are martyred in the cause of Allah,1 He will never render their deeds void.
— Dr. Mustafa Khattab, the Clear Quran
So when you meet those who disbelieve [in battle], strike [their] necks until, when you have inflicted slaughter upon them, then secure [their] bonds,1 and either [confer] favor2 afterwards or ransom [them] until the war lays down its burdens.3 That [is the command]. And if Allah 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 Allah - never will He waste their deeds.
— Saheeh International