11 When all the troops he led were drawn up in position before the city, they pitched camp north of Ai, on the other side of the ravine.
12 He took about five thousand warriors and set them in ambush between Bethel and Ai, west of the city.
13 Thus the people took up their stations, with the main body north of the city and the ambush west of it, and Joshua waited overnight in the valley.
14 The king of Ai saw this, and he and all his army came out very early in the morning to engage Israel in battle at the place in front of the Arabah, not knowing that there was an ambush behind the city.
15 Joshua and the main body of the Israelites fled toward the wilderness, pretending defeat,
16 until the last of the soldiers in the city had been called out to pursue them. Since they were drawn away from the city, with everyone pursuing Joshua,
17 not a soldier remained in Ai or Bethel. They abandoned the city, leaving it open, as they pursued Israel.