“When you go out to fight your enemies and you face horses and chariots and an army greater than your own, do not be afraid. The LORD your God, who brought you out of the land of Egypt, is with you!
When you prepare for battle, the priest must come forward to speak to the troops.
He will say to them, ‘Listen to me, all you men of Israel! Do not be afraid as you go out to fight your enemies today! Do not lose heart or panic or tremble before them.
For the LORD your God is going with you! He will fight for you against your enemies, and he will give you victory!’
“Then the officers of the army must address the troops and say, ‘Has anyone here just built a new house but not yet dedicated it? If so, you may go home! You might be killed in the battle, and someone else would dedicate your house.
Has anyone here just planted a vineyard but not yet eaten any of its fruit? If so, you may go home! You might die in battle, and someone else would eat the first fruit.
Has anyone here just become engaged to a woman but not yet married her? Well, you may go home and get married! You might die in the battle, and someone else would marry her.’
“Then the officers will also say, ‘Is anyone here afraid or worried? If you are, you may go home before you frighten anyone else.’
When the officers have finished speaking to their troops, they will appoint the unit commanders.
“As you approach a town to attack it, you must first offer its people terms for peace.
If they accept your terms and open the gates to you, then all the people inside will serve you in forced labor.
But if they refuse to make peace and prepare to fight, you must attack the town.
When the LORD your God hands the town over to you, use your swords to kill every man in the town.
But you may keep for yourselves all the women, children, livestock, and other plunder. You may enjoy the plunder from your enemies that the LORD your God has given you.
“But these instructions apply only to distant towns, not to the towns of the nations in the land you will enter.
In those towns that the LORD your God is giving you as a special possession, destroy every living thing.
You must completely destroy the Hittites, Amorites, Canaanites, Perizzites, Hivites, and Jebusites, just as the LORD your God has commanded you.
References for Deuteronomy 20:17
This will prevent the people of the land from teaching you to imitate their detestable customs in the worship of their gods, which would cause you to sin deeply against the LORD your God.
“When you are attacking a town and the war drags on, you must not cut down the trees with your axes. You may eat the fruit, but do not cut down the trees. Are the trees your enemies, that you should attack them?
You may only cut down trees that you know are not valuable for food. Use them to make the equipment you need to attack the enemy town until it falls.