Yahweh said to Joshua, Don't be afraid because of them; for tomorrow at this time will I deliver them up all slain before Israel: you shall hamstring their horses, and burn their chariots with fire.
It was this hocking of the horses that deprived the enemy of their chance to escape.  They fled on foot and were no match whatever for the hardened soldiers of Joshua.