13 So 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.
14 And 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 toward the Arabah to meet Israel in battle. But he did not know that there was an ambush against him behind the city.
15 And Joshua and all Israel pretended to be beaten before them and fled in the direction of the wilderness.
16 So all the people who were in the city were called together to pursue them, and as they pursued Joshua they were drawn away from the city.
17 Not a man was left in Ai or Bethel who did not go out after Israel. They left the city open and pursued Israel.
18 Then the Lord said to Joshua, “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.
19 And 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.