It wasn't long before My-Master-Zedek king of Jerusalem heard that Joshua had taken Ai and destroyed it and its king under a holy curse, just as he had done to Jericho and its king. He also learned that the people of Gibeon had come to terms with Israel and were living as neighbors.
So the five Amorite (Western) kings--the king of Jerusalem, the king of Hebron, the king of Jarmuth, the king of Lachish, and the king of Eglon--combined their armies and set out to attack Gibeon.
The men of Gibeon sent word to Joshua camped at Gilgal, "Don't let us down now! Come up here quickly! Save us! Help us! All the Amorite kings who live up in the hills have ganged up on us."
GOD threw them into total confusion before Israel, a major victory at Gibeon. Israel chased them along the ridge to Beth Horon and fought them all the way down to Azekah and Makkedah.
As they ran from the People of Israel, down from the Beth Horon ridge and all the way to Azekah, GOD pitched huge stones on them out of the sky and many died. More died from the hailstones than the People of Israel killed with the sword.
And Sun stopped, Moon stood stock still Until he defeated his enemies. (You can find this written in the Book of Jashar.) The sun stopped in its tracks in mid sky; just sat there all day.
They did it. They brought him the five kings 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 had them all there in front of Joshua, he called up the army and told the field commanders who had been with him, "Come here. Put your feet on the necks of these kings." They stepped up and put their feet on their necks.
At sunset Joshua gave the command. They took them down from the trees and threw them into the cave where they had hidden. They put large stones at the mouth of the cave. The kings are still in there.
That same day Joshua captured Makkedah, a massacre that included the king. He carried out the holy curse. No survivors. Makkedah's king got the same treatment as Jericho's king.
and captured it. They killed everyone, including its king, its villages, and their people. No survivors, the same as with Eglon. They carried out the holy curse on city and people.
He captured it, its king, and its villages. They killed everyone. They put everyone and everything under the holy curse. No survivors. Debir and its king got the same treatment as Hebron and its king, and Libnah and its king.
Joshua took the whole country: hills, desert, foothills, and mountain slopes, including all kings. He left no survivors. He carried out the holy curse on everything that breathed, just as GOD, the God of Israel, had commanded.