Deuteronomy 20:10-15 NASB1995
“When you approach a city to fight against it, you shall offer it terms of peace. If it agrees to make peace with you and opens to you, then all the people who are found in it shall become your forced labor and shall serve you. However, if it does not make peace with you, but makes war against you, then you shall besiege it. When the LORD your God gives it into your hand, you shall strike all the men in it with the edge of the sword. Only the women and the children and the animals and all that is in the city, all its spoil, you shall take as booty for yourself; and you shall use the spoil of your enemies which the LORD your God has given you. Thus you shall do to all the cities that are very far from you, which are not of the cities of these nations nearby.
NASB1995: New American Standard Bible - NASB 1995