Deuteronomy 20:10-18 King James Version (KJV)
10 When thou comest nigh unto a city to fight against it, then proclaim peace unto it.
11 And it shall be, if it make thee answer of peace, and open unto thee, then it shall be, that all the people that is found therein shall be tributaries unto thee, and they shall serve thee.
12 And if it will make no peace with thee, but will make war against thee, then thou shalt besiege it:
13 And when the Lord thy God hath delivered it into thine hands, thou shalt smite every male thereof with the edge of the sword:
14 But the women, and the little ones, and the cattle, and all that is in the city, even all the spoil thereof, shalt thou take unto thyself; and thou shalt eat the spoil of thine enemies, which the Lord thy God hath given thee.
15 Thus shalt thou do unto all the cities which are very far off from thee, which are not of the cities of these nations.
16 But of the cities of these people, which the Lord thy God doth give thee for an inheritance, thou shalt save alive nothing that breatheth:
17 But thou shalt utterly destroy them; namely, the Hittites, and the Amorites, the Canaanites, and the Perizzites, the Hivites, and the Jebusites; as the Lord thy God hath commanded thee:
18 That they teach you not to do after all their abominations, which they have done unto their gods; so should ye sin against the Lord your God.