Deuteronomy 20:11-15

ISV(i) 11 If it agrees to peace and welcomes you, then all the people found in it will serve you as forced laborers. 12 But if they refuse to make peace with you and instead choose war, then attack it. 13 The LORD your God will deliver it into your control, and you must execute every male. 14 The women, children, all the livestock in the city, and all of the spoil and plunder will belong to you. Appropriate the spoil of your enemies, which the LORD your God will give you. 15 Do this to all the cities that are distant from you—that is, to those cities that are not in neighboring nations.”