When Adoni-zedek king of Jerusalem heard how Joshua had taken Ai and had utterly destroyed it, doing to Jericho and its king as he had done to Ai and its king, and how the residents of Gibeon had made peace with Israel and were among them, He feared greatly, because Gibeon was a great city, like one of the royal cities, and because it was greater than Ai, and all its men were mighty. read more.
So Adoni-zedek king of Jerusalem sent to Hoham king of Hebron, to Piram king of Jarmuth, to Japhia king of Lachish, and to Debir king of Eglon, saying, Come up to me and help me, and let us smite Gibeon, for it has made peace with Joshua and with the Israelites. Then the five kings of the Amorites -- "the kings of Jerusalem, Hebron, Jarmuth, Lachish, and Eglon -- "gathered their forces and went up with all their armies and encamped before Gibeon to fight against it. And the men of Gibeon sent to Joshua at the camp in Gilgal, saying, Do not relax your hand from your servants; come up to us quickly and save us and help us, for all the kings of the Amorites who dwell in the hill country are gathered against us. So Joshua went up from Gilgal, he and all the warriors with him and all the mighty men of valor. And the Lord said to Joshua, Do not fear them, for I have given them into your hand; there shall not a man of them stand before you. So Joshua came upon them suddenly, having gone up from Gilgal all night. And the Lord caused [the enemies] to panic before Israel, who slew them with a great slaughter at Gibeon and chased them along the way that goes up to Beth-horon and smote them as far as Azekah and Makkedah. As they fled before Israel, while they were descending [the pass] to Beth-horon, the Lord cast great stones from the heavens on them as far as Azekah, killing them. More died because of the hailstones than the Israelites slew with the sword. Then Joshua spoke to the Lord on the day when the Lord gave the Amorites over to the Israelites, and he said in the sight of Israel, Sun, be silent and stand still at Gibeon, and you, moon, in the Valley of Ajalon! And the sun stood still, and the moon stayed, until the nation took vengeance upon their enemies. Is not this written in the Book of Jasher? So the sun stood still in the midst of the heavens and did not hasten to go down for about a whole day. There was no day like it before or since, when the Lord heeded the voice of a man. For the Lord fought for Israel. Then Joshua returned, and all Israel with him, to the camp at Gilgal. Those five kings fled and hid themselves in the cave of Makkedah. And it was told Joshua, The five kings are hidden in the cave at Makkedah. Joshua said, Roll great stones to the cave's mouth, and set men to guard them. But do not stay. Pursue your enemies and fall upon their rear; do not allow them to enter their cities, for the Lord your God has given them into your hand. When Joshua and the Israelites had ended slaying them until they were wiped out and the remnant remaining of them had entered into fortified cities, All the people returned to the camp to Joshua at Makkedah in peace; none moved his tongue against any of the Israelites. Then said Joshua, Open the mouth of the cave and bring out those five kings to me from the cave. They brought the five kings out of the cave to him -- "the kings of Jerusalem, Hebron, Jarmuth, Lachish, and Eglon. When they brought out those kings to Joshua, [he] called for all the Israelites and told the commanders of the men of war who went with him, Come, put your feet on the necks of these kings. And they came and put their feet on the [kings'] necks. Joshua said to them, Fear not nor be dismayed; be strong and of good courage. For thus shall the Lord do to all your enemies against whom you fight. Afterward Joshua smote and slew them and hanged their bodies on five trees, and they hung on the trees until evening. At sunset Joshua ordered and they took the bodies down from the trees and cast them into the cave where the kings had hidden and laid great stones on the cave's mouth, which remain to this very day.