When you go to war against your enemies, you may see horses, chariots, and armies larger than yours. Don't be afraid of them, because the LORD your God, who brought you out of Egypt, will be with you.
Before the battle starts, a priest must come and speak to the troops.
He should tell them, "Listen, Israel, today you're going into battle against your enemies. Don't lose your courage! Don't be afraid or alarmed or tremble because of them.
The LORD your God is going with you. He will fight for you against your enemies and give you victory."
The officers should tell the troops, "If you have built a new house but not dedicated it, you may go home. Otherwise, you might die in battle, and someone else will dedicate it.
If you have planted a vineyard and not enjoyed the grapes, you may go home. Otherwise, you might die in battle, and someone else will enjoy the grapes.
If you are engaged to a woman but have not married her, you may go home. Otherwise, you might die in battle, and someone else will marry her."
The officers should also tell the troops, "If you are afraid or have lost your courage, you may go home. Then you won't ruin the morale of the other Israelites."
When the officers finish speaking to the troops, they should appoint commanders to lead them.
When you approach a city to attack it, offer its people a peaceful way to surrender.
If they accept it and open [their gates] to you, then all the people there will be made to do forced labor and serve you.
If they won't accept your offer of peace but declare war on you, set up a blockade around the city.
When the LORD your God hands the city over to you, kill every man in that city with your swords.
But take the women and children, the cattle and everything else in the city, including all its goods, as your loot. You may enjoy your enemies' goods that the LORD your God has given you.
This is what you must do to all the cities that are far away which don't belong to the nations nearby.
However, you must not spare anyone's life in the cities of these nations that the LORD your God is giving you as your property.
You must claim the Hittites, Amorites, Canaanites, Perizzites, Hivites, and Jebusites for the LORD and completely destroy them, as the LORD your God has commanded you.
Otherwise, they will teach you to do all the disgusting things they do for their gods, and you will sin against the LORD your God.
This is what you must do whenever you blockade a city for a long time in order to capture it in war. Don't harm any of its fruit trees with an ax. You can eat the fruit. Never cut those trees down, because the trees of the field are not people you have come to blockade.
You may destroy trees that you know are not fruit trees. You may cut them down and use them in your blockade until you capture the city.