Deuteronomy 20:11-15

CLV(i) 11 And it will come to be if it should answer you with peace, and it opens up to you, then it will come to be that all the people who are being found in it shall become tributary to you, and they will serve you. 12 Yet if it should not make peace with you but engages in battle with you, then you must besiege it. 13 When Yahweh your Elohim delivers it into your hand, then you will smite every adult male of it with the edge of the sword;" 14 but the women, the little ones, the domestic beasts and all that is in the city, all its loot, you may plunder for yourself; and you may eat from the loot of your enemies which Yahweh your Elohim gives to you. 15 Thus shall you deal with all the cities which are the very farthest from you, those that are not of the cities of these nations.