The five Amorite kings had run away. They had hidden in the cave at Makkedah.
Joshua was told that the five kings had been found. He was also told that they were hiding in the cave at Makkedah.
He said, "Roll some large rocks up to the opening of the cave. Put some men there to guard it.
But keep on going! Chase your enemies. Attack them from behind. Don't let them get back to their cities. The LORD your God has handed them over to you."
So Joshua and the men of Israel completely destroyed them. They killed almost every one of them. But a few escaped. They went back to their cities that had high walls around them.
Then Israel's whole army returned safely to Joshua. He was in the camp at Makkedah. No one in the land dared to say anything against the people of Israel.
Joshua said, "Open up the cave. Bring those five kings out to me."
So Joshua's men brought the five kings out of the cave. They were the kings of Jerusalem, Hebron, Jarmuth, Lachish and Eglon.
The men brought them to Joshua. Then he sent for all of the men of Israel. He spoke to the army commanders who had come with him. He said, "Come here. Put your feet on the necks of these kings." So they came forward and placed their feet on the necks of the kings.
Joshua said to them, "Don't be afraid. Don't lose hope. Be strong and brave. This is what the LORD will do to all of the enemies you are going to fight."
Joshua struck the five kings down and killed them. He stuck a pole through each of their bodies. Then he set the poles up where people could see the bodies. He left them there until evening.
At sunset Joshua ordered his men to take the bodies down. So they took them down and threw them into the cave where the kings had been hiding. They placed large rocks at the opening of the cave. And the rocks are still there to this very day.
That day Joshua took Makkedah. He killed its people and their king with the sword. He totally destroyed everyone in it. He didn't leave anyone alive. He did to the king of Makkedah the same thing he had done to the king of Jericho.