Now when it came to the ears of Adoni-zedek, king of Jerusalem, that Joshua had taken Ai, and had given it up to the curse (for as he had done to Jericho and its king, so he had done to Ai and its king); and that the people of Gibeon had made peace with Israel and were living among them;