Now these five kings had fled and hidden themselves in the cave at Makkedah. It was told Joshua, saying, “The five kings have been found hidden in the cave at Makkedah.” Joshua said, “Roll large stones against the mouth of the cave, and assign men by it to guard them, but do not stay there yourselves; pursue your enemies and attack them in the rear. Do not allow them to enter their cities, for the LORD your God has delivered them into your hand.” It came about when Joshua and the sons of Israel had finished slaying them with a very great slaughter, until they were destroyed, and the survivors who remained of them had entered the fortified cities, that all the people returned to the camp to Joshua at Makkedah in peace. No one uttered a word against any of the sons of Israel.
Then Joshua said, “Open the mouth of the cave and bring these five kings out to me from the cave.” They did so, and brought these five kings out to him from the cave: the king of Jerusalem, the king of Hebron, the king of Jarmuth, the king of Lachish, and the king of Eglon. When they brought these kings out to Joshua, Joshua called for all the men of Israel, and said to the chiefs of the men of war who had gone with him, “Come near, put your feet on the necks of these kings.” So they came near and put their feet on their necks. Joshua then said to them, “Do not fear or be dismayed! Be strong and courageous, for thus the LORD will do to all your enemies with whom you fight.” So afterward Joshua struck them and put them to death, and he hanged them on five trees; and they hung on the trees until evening. It came about at sunset that Joshua gave a command, and they took them down from the trees and threw them into the cave where they had hidden themselves, and put large stones over the mouth of the cave, to this very day.
Now Joshua captured Makkedah on that day, and struck it and its king with the edge of the sword; he utterly destroyed it and every person who was in it. He left no survivor. Thus he did to the king of Makkedah just as he had done to the king of Jericho.