Deuteronomy 20:1-10

1 When you go out to war against other nations, and come face to face with horses and war-carriages and armies greater in number than yourselves, have no fear of them: for the Lord your God is with you, who took you up out of the land of Egypt.
2 And when you are on the point of attacking, let the priest come forward and say to the people,
3 Give ear, O Israel: today you are going forward to the fight; let your heart be strong; do not let uncontrolled fear overcome you because of those who are against you;
4 For the Lord your God goes with you, fighting for you to give you salvation from those who are against you.
5 And let the overseers say to the people, If there is any man who has made for himself a new house and has not gone into it, let him go back to his house, so that in the event of his death in the fight, another may not take his house for himself.
6 Or if any man has made a vine-garden without taking the first-fruits of it, let him go back to his house, so that in the event of his death in the fight, another may not be the first to make use of the fruit.
7 Or if any man is newly married and has had no sex relations with his wife, let him go back to his house, so that in the event of his death in the fight, another man may not take her.
8 And let the overseers go on to say to the people, If there is any man whose heart is feeble with fear, let him go back to his house before he makes the hearts of his countrymen feeble.
9 Then, after saying these words to the people, let the overseers put captains over the army.
10 When you come to a town, before attacking it, make an offer of peace.