Yahweh confused them before Israel, and he killed them with a great slaughter at Gibeon, and chased them by the way of the ascent of Beth Horon, and struck them to Azekah, and to Makkedah.
So Joshua returned, and all Israel with him, to the camp of Gilgal. But the five kings hid themselves in a cave. And so they came and told Joshua these five kings were hiding in the caves. So Joshua said, Throw a bunch of stones over the cave, seal it up, and stand outside and guard the thing ( Joshua 10:15-18 ).