Joshua 8:9-22

9So Joshua sent them out. And they went to the place of ambush and lay between Bethel and Ai, to the west of Ai, but Joshua spent that night among the people.

10Joshua arose early in the morning and mustered the people and went up, he and the elders of Israel, before the people to Ai. 11And aall the fighting men who were with him went up and drew near before the city and encamped on the north side of Ai, with a ravine between them and Ai. 12He took about 5,000 men and set them in ambush between Bethel and Ai, to the west of the city. 13So they stationed the forces, the main encampment that was north of the city and its rear guard west of the city. But Joshua spent that night in the valley. 14And as soon as the king of Ai saw this, he and all his people, the men of the city, hurried and went out early to the appointed place
Hebrew  appointed time
toward cthe Arabah to meet Israel in battle. dBut he did not know that there was an ambush against him behind the city.
15And Joshua and all Israel epretended to be beaten before them and fled in the direction of the wilderness. 16So all the people who were in the city were called together to pursue them, and as they pursued Joshua they fwere drawn away from the city. 17Not a man was left in Ai or Bethel who did not go out after Israel. They left the city open and pursued Israel.

18Then the Lord said to Joshua, g“Stretch out the javelin that is in your hand toward Ai, for I will give it into your hand.” And Joshua stretched out the javelin that was in his hand toward the city. 19And the men in the ambush rose quickly out of their place, and as soon as he had stretched out his hand, they ran and entered the city and captured it. And they hurried to set the city on fire. 20So when the men of Ai looked back, behold, the smoke of the city went up to heaven, and they had no power to flee this way or that, for the people who fled to the wilderness turned back against the pursuers. 21And when Joshua and all Israel saw that the ambush had captured the city, and that the smoke of the city went up, then they turned back and struck down the men of Ai. 22And the others came out from the city against them, so they were in the midst of Israel, some on this side, and some on that side. And Israel struck them down, until there was hleft none that survived or escaped.
Copyright information for ESV