When you march up to attack a city, make its people an offer of peace. If they accept and open their gates, all the people in it shall be subject to forced labor and shall work for you. If they refuse to make peace and they engage you in battle, lay siege to that city. When the Lord your God delivers it into your hand, put to the sword all the men in it. As for the women, the children, the livestock and everything else in the city, you may take these as plunder for yourselves. . . . This is how you are to treat all the cities that are at a distance from you and do not belong to the nations nearby.
However, in the cities of the nations the Lord your God is giving you as an inheritance, do not leave alive anything that breathes. Completely destroy them—the Hittites, Amorites, Canaanites, Perizzites, Hivites and Jebusites—as the Lord your God has commanded you.