The Old Testament is extremely tribal, and commanded the Chosen to exterminate several competing tribes. I'd rather it not be followed too closely:
1 Samuel 15:3 Now go and smite Amalek, and utterly destroy all that they have, and spare them not; but slay both man and woman, infant and suckling, ox and sheep, camel and ass.
Numbers 21:3 The Lord gave the Canaanites over to Israel, who "completely destroyed them and their towns."
Numbers 31:17-18 God commanded Moses to kill all of the male Midianite children and "kill every woman who has slept with a man, but save for yourselves every girl who has never slept with a man."