King Adoni Zedek of Jerusalem heard that Joshua had captured Ai and claimed it for the LORD the same way he had destroyed Jericho and its king. He also heard that the people of Gibeon had made peace with the people of Israel and were living with them.
He and his people were terribly afraid because Gibeon was a large city. It was like one of the royal cities, larger than Ai. All its men were warriors.
So King Adoni Zedek of Jerusalem sent [this message] to King Hoham of Hebron, King Piram of Jarmuth, King Japhia of Lachish, and King Debir of Eglon:
"Come, help me destroy Gibeon because it has made peace with Joshua and the people of Israel."
So the five Amorite kings of Jerusalem, Hebron, Jarmuth, Lachish, and Eglon combined their armies. They marched to Gibeon, camped there, and attacked it.
The men of Gibeon sent this message to Joshua at the camp in Gilgal: "Don't abandon us! Come quickly, and save us. Help us because all the Amorite kings who live in the mountains have united against us."
So Joshua, with all his soldiers and best warriors, set out from Gilgal.
The LORD told Joshua, "Don't be afraid of them. I have handed them over to you. None of them can stand up to you."
So Joshua marched all night from Gilgal and took them by surprise.
The LORD threw the enemy into disorder in front of Israel and defeated them decisively at Gibeon. He chased them along the road that goes to the slope of Beth Horon and continued to defeat them all the way to Azekah and Makkedah.
As they fled from the Israelites down the slope of Beth Horon toward Azekah, the LORD threw huge hailstones on them. More died from the hailstones than from Israelite swords.
The day the LORD handed the Amorites over to the people of Israel, Joshua spoke to the LORD while Israel was watching, "Sun, stand still over Gibeon, and moon, stand still over the valley of Aijalon!"
The sun stood still, and the moon stopped until a nation got revenge on its enemies. Isn't this recorded in the Book of Jashar? The sun stopped in the middle of the sky, and for nearly a day the sun was in no hurry to set.
Never before or after this day was there anything like it. The LORD did what a man told him to do, because the LORD fought for Israel.
Then Joshua and all Israel returned to the camp at Gilgal.
The five kings ran away and hid in the cave at Makkedah.
Someone told Joshua, "The five kings have been found. They are hiding in the cave at Makkedah."
Joshua replied, "Roll large stones against the mouth of the cave, and post a guard there.
But don't stop. Chase your enemies! Cut off their rear guard. Don't let them get back into their own cities, because the LORD your God has handed them over to you."
Joshua and the Israelites defeated them decisively, almost destroying them. But some who survived got back into the fortified cities.
Then the whole army returned safely to Joshua in the camp at Makkedah. Not a single person dared to speak against any of the Israelites.
Joshua said, "Open the cave, and bring me the five kings!"
So they brought him the kings of Jerusalem, Hebron, Jarmuth, Lachish, and Eglon.
When they brought them to Joshua, he called for all the men of Israel. He told the officers who had gone with him, "Come forward and put your feet on the necks of these kings." So that's what they did.
Joshua told them, "Don't be afraid or terrified! Be strong and courageous, because this is what the LORD will do to all the enemies you're fighting against."
After this, Joshua put them to death and hung their bodies on five poles until evening.
When the sun went down, Joshua gave the order to take them down from the poles. Then they threw them into the cave where they had been hiding and put large stones over the mouth of the cave. These stones are still there today.
That same day Joshua captured Makkedah, and the Israelites killed its people and king with swords. He claimed them for the LORD by destroying them. There were no survivors. He did the same thing to the king of Makkedah that he had done to the king of Jericho.
Joshua and all Israel marched from Makkedah to Libnah and attacked it.
The LORD also handed Libnah and its king over to Israel. He killed all the people. There were no survivors. He did the same thing to the king of Libnah that he had done to the king of Jericho.
Joshua and all Israel marched from Libnah to Lachish, camped there, and attacked it.
The LORD handed Lachish over to Israel. He captured it on the next day and killed all the people, the same way he had captured Libnah.
At that time King Horam of Gezer had come to help Lachish. But Joshua killed him and his troops. There were no survivors.
Joshua and all Israel marched from Lachish to Eglon, camped there, and attacked it.
They captured it that day and killed everyone in it. He claimed it for the LORD by destroying it the same way he had destroyed Lachish.
Then Joshua and all Israel marched from Eglon to Hebron and attacked it.
They captured it and its neighboring villages and killed its king and all the people. There were no survivors, the same as at Eglon. He claimed the city and all its people for the LORD by destroying them.
Then Joshua and all Israel went back to Debir and attacked it.
He captured it and its king and all its neighboring villages and killed everyone. So they claimed them all for the LORD by destroying them. There were no survivors. He did the same thing to Debir and its king that he had done to Hebron and Libnah and their kings.
So Joshua captured the whole land-the mountains, the Negev, the foothills, and the slopes. There were no survivors. He claimed every living creature for the LORD by destroying it, as the LORD God of Israel had commanded.
So Joshua defeated the people from Kadesh Barnea to Gaza and from all the country of Goshen as far as Gibeon.
Joshua captured all these kings and their territories in one campaign because the LORD God of Israel fought for Israel.
Then Joshua and all Israel returned to the camp at Gilgal.