When King Adoni-zedek of Jerusalem heard that Joshua had captured Ai and sacked it, treating Ai and its king as he had treated Jericho and its king, and that the citizens of Gibeon had made terms with Israel,