During the fight the five kings ran away and hid in a cave near Makkedah, but someone found them hiding in the cave at Makkedah and told Joshua. So he said, “Cover the opening of the cave with large rocks. Put some men there to guard it, but don’t stay there yourselves. Continue chasing the enemy and attacking them from behind. Don’t let them get to their cities, because the LORD your God will hand them over to you.”
So Joshua and the Israelites killed the enemy, but a few were able to get back to their strong, walled cities. After the fighting, Joshua’s men came back safely to him at Makkedah. No one was brave enough to say a word against the Israelites.
Joshua said, “Move the rocks that are covering the opening of the cave and bring those five kings out to me.” So Joshua’s men brought the five kings out of the cave—the kings of Jerusalem, Hebron, Jarmuth, Lachish, and Eglon. When they brought the five kings out to Joshua, he called for all his men. He said to the commanders of his army, “Come here! Put your feet on the necks of these kings.” So they came close and put their feet on their necks.
Joshua said to his men, “Be strong and brave! Don’t be afraid, because I will show you what the LORD will do to the enemies you will fight in the future.” Then Joshua killed the five kings and hung their bodies on five trees, where he left them until evening.
At sunset Joshua told his men to take the bodies down from the trees. Then they threw them into the same cave where they had been hiding and covered the opening of the cave with large rocks, which are still there today.
That day Joshua defeated Makkedah. He killed the king and completely destroyed all the people in that city as an offering to the LORD; no one was left alive. He did the same thing to the king of Makkedah that he had done to the king of Jericho.
Joshua and all the Israelites traveled from Makkedah to Libnah and attacked it. The LORD handed over the city and its king. They killed every person in the city; no one was left alive. And they did the same thing to that king that they had done to the king of Jericho.
Then Joshua and all the Israelites left Libnah and went to Lachish, which they surrounded and attacked. The LORD handed over Lachish on the second day. The Israelites killed everyone in that city just as they had done to Libnah. During this same time Horam king of Gezer came to help Lachish, but Joshua also defeated him and his army; no one was left alive.
Then Joshua and all the Israelites went from Lachish to Eglon. They surrounded Eglon, attacked it, and captured it the same day. They killed all its people and completely destroyed everything in it as an offering to the LORD, just as they had done to Lachish.
Then Joshua and the Israelites went from Eglon to Hebron and attacked it, capturing it and all the little towns near it. The Israelites killed everyone in Hebron; no one was left alive there. Just as they had done to Eglon, they completely destroyed the city and all its people as an offering to the LORD.
Then Joshua and the Israelites went back to Debir and attacked it. They captured that city, its king, and all the little towns near it, completely destroying everyone in Debir as an offering to the LORD; no one was left alive there. Israel did to Debir and its king just as they had done to Libnah and its king, just as they had done to Hebron.
So Joshua defeated all the kings of the cities of these areas: the mountains, southern Canaan, the western hills, and the slopes. The LORD, the God of Israel, had told Joshua to completely destroy all the people as an offering to the LORD, so he left no one alive in those places. Joshua captured all the cities from Kadesh Barnea to Gaza, and from Goshen to Gibeon. He captured all these cities and their kings on one trip, because the LORD, the God of Israel, was fighting for Israel.
Then Joshua and all the Israelites returned to their camp at Gilgal.