Deuteronomy 20:15

Thus you shall do to all the cities which are very far from you, which are not of the cities of these nations.