Numbers 32-33
“It shall come about that those whom you let remain of them will become as pricks in your eyes and as thorns in your sides” (33:55). Many times when God led Israel to war, they had instructions to completely destroy the nation (ch 31, Midian). Apparently this harsh rule was meant to both judge wicked nations (where child sacrifice was common, for example), and also to protect Israel from their influence.
The violent ways of the Old Testament remind us of sin’s power. But instead of slaughtering the world, God Himself absorbed the ugly consequences on the cross, giving us His peace in exchange.