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.