Then those five kings fled and hid in the cave at Makkedah.
It was reported to Joshua, "The five kings have been found, hidden in the cave at Makkedah."
Joshua said, "Roll large stones over the mouth of the cave. Station some men by it to guard them,
but don't you stay there. Chase after your enemies and attack them from the rear. Don't let them enter their cities, because the LORD your God has given them into your power."
Joshua and the Israelites finished dealing them a stunning blow until they were finished off. Some survivors among them escaped into the fortified cities.
Then the whole people came back safely to Joshua in the camp at Makkedah. Not a single person threatened the Israelites.
Joshua said, "Open up the mouth of the cave. Bring those five kings out of the cave to me."
They did so. They brought the five kings out of the cave to him: the kings of Jerusalem, Hebron, Jarmuth, Lachish, and Eglon.
When they brought these kings out to Joshua, Joshua called for every Israelite. He said to the military commanders who had gone out with him, "Come forward. Put your feet on the necks of these kings." So they went forward and put their feet on their necks.
Then Joshua said to them, "Don't be afraid or terrified. Be brave and strong, because this is how the LORD will deal with all the enemies you fight."
Next, Joshua struck them down. He put them to death and then hanged them on five trees. They were hanging on the trees until evening.
At sundown, Joshua gave an order, and they took them down from the trees. They threw them into the cave where they had hidden themselves, and they set large stones over the mouth of the cave. The stones are still there to this very day.