Now Joshua had taken about five thousand men and set up an ambush between Bethel and Ai, to the west of the city.