And he took about 5,000 men and set them in ambush between Bethel and Ai, on the west side of the city.