Joshua10:1

Adoni-zedek, king of Jerusalem, heard that Joshua had taken Ai and had utterly destroyed it, doing to Ai and her king as he had done to Jericho and her king. Along with that news of victory came word that the inhabitants of Gibeon had made peace with Israel and were among them. The Gibeonites had secured that peace by deception, because they knew they could not resist Israel in battle. Israel's leaders had consented to the treaty without seeking counsel from the Lord.