Deuteronomy 20 New Revised Standard Version (NRSV)
Rules of Warfare
20 When you go out to war against your enemies, and see horses and chariots, an army larger than your own, you shall not be afraid of them; for the Lord your God is with you, who brought you up from the land of Egypt. 2 Before you engage in battle, the priest shall come forward and speak to the troops, 3 and shall say to them: “Hear, O Israel! Today you are drawing near to do battle against your enemies. Do not lose heart, or be afraid, or panic, or be in dread of them; 4 for it is the Lord your God who goes with you, to fight for you against your enemies, to give you victory.” 5 Then the officials shall address the troops, saying, “Has anyone built a new house but not dedicated it? He should go back to his house, or he might die in the battle and another dedicate it. 6 Has anyone planted a vineyard but not yet enjoyed its fruit? He should go back to his house, or he might die in the battle and another be first to enjoy its fruit. 7 Has anyone become engaged to a woman but not yet married her? He should go back to his house, or he might die in the battle and another marry her.” 8 The officials shall continue to address the troops, saying, “Is anyone afraid or disheartened? He should go back to his house, or he might cause the heart of his comrades to melt like his own.” 9 When the officials have finished addressing the troops, then the commanders shall take charge of them.
10 When you draw near to a town to fight against it, offer it terms of peace. 11 If it accepts your terms of peace and surrenders to you, then all the people in it shall serve you at forced labor. 12 If it does not submit to you peacefully, but makes war against you, then you shall besiege it; 13 and when the Lord your God gives it into your hand, you shall put all its males to the sword. 14 You may, however, take as your booty the women, the children, livestock, and everything else in the town, all its spoil. You may enjoy the spoil of your enemies, which the Lord your God has given you. 15 Thus you shall treat all the towns that are very far from you, which are not towns of the nations here. 16 But as for the towns of these peoples that the Lord your God is giving you as an inheritance, you must not let anything that breathes remain alive. 17 You shall annihilate them—the Hittites and the Amorites, the Canaanites and the Perizzites, the Hivites and the Jebusites—just as the Lord your God has commanded, 18 so that they may not teach you to do all the abhorrent things that they do for their gods, and you thus sin against the Lord your God.
19 If you besiege a town for a long time, making war against it in order to take it, you must not destroy its trees by wielding an ax against them. Although you may take food from them, you must not cut them down. Are trees in the field human beings that they should come under siege from you? 20 You may destroy only the trees that you know do not produce food; you may cut them down for use in building siegeworks against the town that makes war with you, until it falls.