1 Adoni-zedek king of Jerusalem heard that Joshua had taken Ai and devoted it to destruction, treating Ai and its king as he had treated Jericho and its king, and that the people of Gibeon had made peace with Israel and were living among them.
2 He and his people were terrified, because Gibeon was a great city, like one of the royal cities; it was larger than Ai, and all its men were warriors.
3 So Adoni-zedek king of Jerusalem sent this message to Hoham king of Hebron, Piram king of Jarmuth, Japhia king of Lachish, and Debir king of Eglon:
4 "Come up and help me attack Gibeon, because it has made peace with Joshua and the children of Israel."
5 Then the five Amorite kings, the kings of Jerusalem, Hebron, Jarmuth, Lachish, and Eglon, joined forces and went up with all their armies. They took up positions against Gibeon and attacked it.
6 The men of Gibeon sent word to Joshua in the camp at Gilgal: "Do not abandon your servants. Come up to us quickly! Save us and help us, because all the Amorite kings from the hill country have joined forces against us."
7 So Joshua marched up from Gilgal with his whole army, including all his valiant warriors.
8 The LORD told Joshua, "Do not fear them, for I have handed them over to you. Not one of them will be able to withstand you."
9 After marching all night from Gilgal, Joshua took them by surprise.
10 The LORD threw them into confusion before Israel and struck them with a great slaughter at Gibeon. He chased them along the road that climbs to Beth-horon and cut them down all the way to Azekah and Makkedah.
11 As they fled from Israel down the slope of Beth-horon, the LORD hurled large stones from the sky on them all the way to Azekah, and they died. More of them died from the hailstones than the children of Israel killed with the sword.
12 On the day the LORD handed the Amorites over to the children of Israel, Joshua spoke to the LORD, and in the presence of Israel he said, "Sun, be still over Gibeon, and you, moon, over the Valley of Aijalon."
13 So the sun stood still, and the moon stopped, until the nation had avenged itself on its enemies. Is it not written in the Book of Jashar? The sun stopped in the middle of the sky and delayed going down for about a full day.
14 Never before or since has there been a day like it, a day when the LORD listened to the voice of a man, for the LORD was fighting for Israel.
15 Then Joshua went back with all Israel to the camp at Gilgal.
16 Meanwhile the five kings had run away and hidden in the cave at Makkedah.
17 Joshua was told, "The five kings have been found hiding in the cave at Makkedah."
18 Joshua said, "Roll large stones over the mouth of the cave, and post men there to guard it.
19 But do not stop yourselves! Keep after your enemies and attack them from behind. Do not let them get back into their cities, for the LORD your God has handed them over to you."
20 Joshua and the children of Israel struck them with a very heavy slaughter until they were wiped out, and those who survived escaped into the fortified cities.
21 Then the whole army returned safely to Joshua in the camp at Makkedah. No one dared to say a word against the children of Israel.
22 Joshua said, "Open the mouth of the cave and bring those five kings out to me."
23 They did this and brought the five kings out of the cave to him: the kings of Jerusalem, Hebron, Jarmuth, Lachish, and Eglon.
24 When they had brought these kings out to Joshua, he called together all the men of Israel and said to the commanders of the soldiers who had gone with him, "Come here and put your feet on the necks of these kings." So they came forward and placed their feet on their necks.
25 Joshua told them, "Do not be afraid or discouraged. Be strong and brave, because this is what the LORD will do to all the enemies you are going to fight."
26 After that Joshua struck the kings down and killed them, and he hung their bodies on five trees, where they stayed hanging until evening.
27 At sunset Joshua gave orders, and they took them down from the trees and threw them into the cave where they had been hiding. They placed large stones over the mouth of the cave, and the stones are there to this very day.
28 That same day Joshua captured Makkedah and put the city and its king to the sword. He devoted to destruction everyone in it, leaving no survivors, and he did to the king of Makkedah what he had done to the king of Jericho.
29 Joshua and all Israel with him moved on from Makkedah to Libnah and attacked it.
30 The LORD handed it also, with its king, over to Israel. Joshua put the city and everyone in it to the sword, leaving no survivors there, and he did to its king what he had done to the king of Jericho.
31 Joshua and all Israel with him moved on from Libnah to Lachish. They took up positions against it and attacked it.
32 The LORD handed Lachish over to Israel, and Joshua took it on the second day. He put the city and everyone in it to the sword, just as he had done to Libnah.
33 Meanwhile Horam king of Gezer came up to help Lachish, but Joshua defeated him and his army, leaving him no survivors.
34 Joshua and all Israel with him moved on from Lachish to Eglon. They took up positions against it and attacked it.
35 They captured it that same day and put it to the sword, and he devoted to destruction everyone in it that day, just as he had done to Lachish.
36 Then Joshua and all Israel with him went up from Eglon to Hebron and attacked it.
37 They took the city and put it to the sword, together with its king, its towns, and everyone in it. He left no survivors, just as at Eglon; he devoted it and everyone in it to destruction.
38 Then Joshua and all Israel with him turned back to Debir and attacked it.
39 He captured the city, its king, and its towns. They put them to the sword and devoted to destruction everyone in it, leaving no survivors. He did to Debir and its king what he had done to Hebron and what he had done to Libnah and its king.
40 So Joshua conquered the whole region, the hill country, the Negev, the lowland, and the slopes, together with all their kings. He left no survivors, but devoted to destruction every living thing, as the LORD, the God of Israel, had commanded.
41 Joshua defeated them from Kadesh-barnea to Gaza, and the whole region of Goshen as far as Gibeon.
42 Joshua captured all these kings and their lands in a single campaign, because the LORD, the God of Israel, fought for Israel.
43 Then Joshua returned with all Israel to the camp at Gilgal.