He took about five thousand men and positioned them as an ambush between Bethel and Ai to the west of the city.