For it was Yahweh’s doing to harden their hearts to wage war against Israel, so that he might devote them to destruction without mercy, and destroy them, just as Yahweh had commanded Moses.
In context
18Joshua waged war against all these kings for a long time. 19There was not a city that made peace with the Israelites except the Hivites living in Gibeon; all the others they took in battle. 20For it was Yahweh’s doing to harden their hearts to wage war against Israel, so that he might devote them to destruction without mercy, and destroy them, just as Yahweh had commanded Moses. 21At that time Joshua went and cut off the Anakim from the hill country — from Hebron, Debir, Anab, and all the hill country of Judah, and all the hill country of Israel. Joshua devoted them to destruction, together with their cities. 22No Anakim were left in the land of the Israelites; only in Gaza, Gath, and Ashdod did some remain.