The LORD threw them into confusion before Israel, so Joshua and the Israelites defeated them completely at Gibeon. Israel pursued them along the road going up to Beth Horon and cut them down all the way to Azekah and Makkedah.
As they fled before Israel on the road down from Beth Horon to Azekah, the LORD hurled large hailstones down on them, and more of them died from the hail than were killed by the swords of the Israelites.
On the day the LORD gave the Amorites over to Israel, Joshua said to the LORD in the presence of Israel: “Sun, stand still over Gibeon, and you, moon, over the Valley of Aijalon.”
So the sun stood still, and the moon stopped, till the nation avenged itself on its enemies, as it is written in the Book of Jashar. The sun stopped in the middle of the sky and delayed going down about a full day.
There has never been a day like it before or since, a day when the LORD listened to a human being. Surely the LORD was fighting for Israel!
Then Joshua returned with all Israel to the camp at Gilgal.
Now the five kings had fled and hidden in the cave at Makkedah.
When Joshua was told that the five kings had been found hiding in the cave at Makkedah,
he said, “Roll large rocks up to the mouth of the cave, and post some men there to guard it.
But don’t stop; pursue your enemies! Attack them from the rear and don’t let them reach their cities, for the LORD your God has given them into your hand.”
So Joshua and the Israelites defeated them completely, but a few survivors managed to reach their fortified cities.