Deuteronomy 20
1When you go out to battle against your enemies and see horses and chariots and an army more numerous than yours, do not be afraid of them, for Yahweh your God, who brought you up from the land of Egypt, is with you. 2As you approach the battle, the priest must come forward and speak to the people. 3He must say to them, “Listen, Israel! Today you are approaching battle against your enemies. Do not lose heart. Do not be afraid or panic or tremble before them. 4For Yahweh your God is the one who goes with you, to fight for you against your enemies and save you.”
5Then the officers must speak to the people: “Who has built a new house and not dedicated it? Let him go back to his house, so that he does not die in battle and another man dedicate it. 6Who has planted a vineyard and not begun to enjoy it? Let him go back to his house, so that he does not die in battle and another man begin to enjoy it. 7Who has become engaged to a woman and not married her? Let him go back to his house, so that he does not die in battle and another man marry her.” 8The officers must speak further to the people: “Who is afraid and fainthearted? Let him go back to his house, so that he does not melt his brothers’ hearts like his own.” 9When the officers finish speaking to the people, they must appoint army commanders at the head of the people.
10When you approach a city to fight against it, offer it terms of peace. 11If it answers you peacefully and opens its gates to you, all the people found in it must become your forced laborers and serve you. 12If it will not make peace with you but makes war against you, besiege it. 13When Yahweh your God gives it into your hand, strike down every male in it with the edge of the sword. 14But the women, the little children, the livestock, and everything in the city—all its plunder—you may take as spoil for yourself. You may consume the plunder of your enemies that Yahweh your God gives you. 15This is what you must do to all the cities very far from you, which do not belong to the cities of these nations.
16But in the cities of these peoples that Yahweh your God is giving you as an inheritance, you must not leave anything that breathes alive. 17You must devote them completely to destruction—the Hittites, the Amorites, the Canaanites, the Perizzites, the Hivites, and the Jebusites—as Yahweh your God commanded you, 18so that they do not teach you to do all their detestable things that they do for their gods, and you sin against Yahweh your God.
19When you besiege a city for a long time, fighting against it to capture it, do not destroy its trees by wielding an ax against them. You may eat from them, but you must not cut them down. Is the tree of the field a human being, to come under siege before you? 20Only a tree that you know is not a food tree may you destroy and cut down, to build siegeworks against the city making war with you, until it falls.