14When the king of Ai saw the Israelites, he hurried out early in the morning with the men of the city to engage them in battle at an appointed place overlooking the Arabah. But he did not know that an ambush had been set up against him behind the city.
15Joshua and all Israel let themselves be beaten back before them, and they fled toward the wilderness.
16Then all the men of Ai were summoned to pursue them, and they followed Joshua and were drawn away from the city.
— Joshua 8:14-16