So Joshua despatched them, and they went to the place of ambush, remaining between Bethel and Ai, to the west of Ai. Joshua spent the night in the camp in the valley.