Cross reference
Joshua 8:12
12 And he took about five thousand men, and set them to lie in ambush between Bethel and Ai, on the west side of the city.
Joshua 8:2-3
2 And thou shalt do to Ai and her king as thou didst unto Jericho and her king: only the spoil thereof, and the cattle thereof, shall ye take for a prey unto yourselves: lay thee an ambush for the city behind it.
3 So Joshua arose, and all the people of war, to go up against Ai: and Joshua chose out thirty thousand mighty men of valor, and sent them away by night.