At this time Adoni-Zedek king of Jerusalem heard that Joshua had defeated Ai and completely destroyed it, as he had also done to Jericho and its king. The king also learned that the Gibeonites had made a peace agreement with Israel and that they lived nearby.
So Adoni-Zedek king of Jerusalem sent a message to Hoham king of Hebron, Piram king of Jarmuth, Japhia king of Lachish, and Debir king of Eglon. He begged them,
Then these five Amorite kings—the kings of Jerusalem, Hebron, Jarmuth, Lachish, and Eglon—gathered their armies, went to Gibeon, surrounded it, and attacked it.