The five Amorite kings, however, had escaped and were hiding in the cave at Makkedah.
Someone found them, and Joshua was told where they were hiding.
He said, "Roll some big stones in front of the entrance to the cave. Place some guards there,
but don't stay there yourselves. Keep on after the enemy and attack them from the rear; don't let them get to their cities! The Lord your God has given you victory over them."
Joshua and the men of Israel slaughtered them, although some managed to find safety inside their city walls and were not killed.
Then all of Joshua's men came back safe to him at the camp at Makkedah. No one in the land dared even to speak against the Israelites.
Then Joshua said, "Open the entrance to the cave and bring those five kings out to me."
So the cave was opened, and the kings of Jerusalem, Hebron, Jarmuth, Lachish, and Eglon were brought out
and taken to Joshua. Joshua then called all the men of Israel to him and ordered the officers who had gone with him to come and put their feet on the necks of the kings. They did so.
Then Joshua said to his officers, "Don't be afraid or discouraged. Be determined and confident because this is what the Lord is going to do to all your enemies."
Then Joshua killed the kings and hanged them on five trees, where their bodies stayed until evening.
At sundown Joshua gave orders, and their bodies were taken down and thrown into the same cave where they had hidden earlier. Large stones were placed at the entrance to the cave, and they are still there.
Joshua attacked and captured Makkedah and its king that day. He put everyone in the city to death; no one was left alive. He did to the king of Makkedah what he had done to the king of Jericho.
After this, Joshua and his army went on from Makkedah to Libnah and attacked it.
The Lord also gave the Israelites victory over this city and its king. They spared no one, but killed every person in it. They did to the king what they had done to the king of Jericho.
After this, Joshua and his army went on from Libnah to Lachish, surrounded it and attacked it.
The Lord gave the Israelites victory over Lachish on the second day of the battle. Just as they had done at Libnah, they spared no one, but killed every person in the city.
King Horam of Gezer came to the aid of Lachish, but Joshua defeated him and his army and left none of them alive.
Next, Joshua and his army went on from Lachish to Eglon, surrounded it and attacked it.
They captured it the same day and put everyone there to death, just as they had done at Lachish.
After this, Joshua and his army went from Eglon up into the hills to Hebron, attacked it
and captured it. They killed the king and everyone else in the city as well as in the nearby towns. Joshua condemned the city to total destruction, just as he had done to Eglon. No one in it was left alive.
Then Joshua and his army turned back to Debir and attacked it.
He captured it, with its king and all the nearby towns. They put everyone there to death. Joshua did to Debir and its king what he had done to Hebron and to Libnah and its king.
Joshua conquered the whole land. He defeated the kings of the hill country, the eastern slopes, and the western foothills, as well as those of the dry country in the south. He spared no one; everyone was put to death. This was what the Lord God of Israel had commanded.
Joshua's campaign took him from Kadesh Barnea in the south to Gaza near the coast, including all the area of Goshen, and as far north as Gibeon.
Joshua conquered all these kings and their territory in one campaign because the Lord, Israel's God, was fighting for Israel.
After this, Joshua and his army went back to the camp at Gilgal.