While Jehoshaphat was living in Jerusalem, he regularly went to the people between Beersheba and the mountains of Ephraim. He brought the people back to the Lord God of their ancestors.
The Lord will let your enemies defeat you. You will attack them from one direction but run away from them in seven directions. You will become a thing of horror to all the kingdoms in the world.
How could one person chase a thousand or two people make ten thousand flee? Their rock used these people to defeat them and the Lord gave them no help.
The men who had captured the city also came out and attacked them. The men of Ai were caught between the battle lines of Israel. So Israel attacked them on both sides. None of them survived or escaped.