Encouraged to Fight

So, when you meet the disbelievers in battle, strike their necks. Then, once you have subdued them, bind them firmly. Afterward, release them graciously or for ransom, until the war lays down its burdens. Had God willed, He could have defeated them Himself, but He tests some of you through others. And those who are slain in God’s cause, He will never let their deeds go to waste.

47:4Now when ye meet in battle those who disbelieve, then it is smiting of the necks until, when ye have routed them, then making fast of bonds; and afterward either grace or ransom till the war lay down its burdens. That (is the ordinance). And if Allah willed He could have punished them (without you) but (thus it is ordained) that He may try some of you by means of others. And those who are slain in the way of Allah, He rendereth not their actions vain.