So the five Amorite kings (the kings of Jerusalem, Hebron, Jarmuth, Lachish, and Eglon) and all their troops gathered together and advanced. They deployed their troops and fought against Gibeon.
He did this while the army of the king of Babylon was attacking Jerusalem and the cities of Lachish and Azekah. He was attacking these cities because they were the only fortified cities of Judah which were still holding out.
The Amalekites live in the land of the Negev; the Hittites, Jebusites, and Amorites live in the hill country; and the Canaanites live by the sea and along the banks of the Jordan.”
The men of Gibeon sent this message to Joshua at the camp in Gilgal, “Do not abandon your subjects! Rescue us! Help us! For all the Amorite kings living in the hill country are attacking us.”
The cities that the Philistines had captured from Israel were returned to Israel, from Ekron to Gath. Israel also delivered their territory from the control of the Philistines. There was also peace between Israel and the Amorites.