Deuteronomy 20:1-20 - Rules For War
1 When you go to war against your enemies and see chariotry and troops who outnumber you, do not be afraid of them, for the Lord your God, who brought you up out of the land of Egypt, is with you. 2 As you move forward for battle, the priest will approach and say to the soldiers, 3 "Listen, Israel! Today you are moving forward to do battle with your enemies. Do not be fainthearted. Do not fear and tremble or be terrified because of them, 4 for the Lord your God goes with you to fight on your behalf against your enemies to give you victory."
5 Moreover, the officers are to say to the troops, "Who among you has built a new house and not dedicated it? He may go home, lest he die in battle and someone else dedicate it. 6 Or who among you has planted a vineyard and not benefited from it? He may go home, lest he die in battle and someone else benefit from it. 7 Or who among you has become engaged to a woman but has not married her? He may go home, lest he die in battle and someone else marry her." 8 In addition, the officers are to say to the troops, "Who among you is afraid and fainthearted? He may go home so that he will not make his fellow soldier's heart as fearful as his own." 9 Then, when the officers have finished speaking, they must appoint unit commanders to lead the troops.
10 When you approach a city to wage war against it, offer it terms of peace. 11 If it accepts your terms and submits to you, all the people found in it will become your slaves. 12 If it does not accept terms of peace but makes war with you, then you are to lay siege to it. 13 The Lord your God will deliver it over to you and you must kill every single male by the sword. 14 However, the women, little children, cattle, and anything else in the city -- all its plunder -- you may take for yourselves as spoil. You may take from your enemies the plunder that the Lord your God has given you. 15 This is how you are to deal with all those cities located far from you, those that do not belong to these nearby nations. 16 As for the cities of these peoples that the Lord your God is going to give you as an inheritance, you must not allow a single living thing to survive. 17 Instead you must utterly annihilate them -- the Hittites, Amorites, Canaanites, Perizzites, Hivites, and Jebusites -- just as the Lord your God has commanded you, 18 so that they cannot teach you all the abhorrent ways they worship their gods, causing you to sin against the Lord your God.
19 If you besiege a city for a long time while attempting to capture it, you must not chop down its trees, for you may eat fruit from them and should not cut them down. A tree in the field is not human that you should besiege it! 20 However, you may chop down any tree you know is not suitable for food, and you may use it to build siege works against the city that is making war with you until that city falls.