Deuteronomy 20:10-14 New Revised Standard Version (NRSV)
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.