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.
Early the next morning Joshua mustered the army and went up to Ai at its head, with the elders of Israel.
He took about five thousand warriors and set them in ambush between Bethel and Ai, west of the city.