From there he moved on to the hill country east of Bethel and pitched his tent, with Bethel on the west and Ai on the east. He built an altar to Yahweh there, and he called on the name of Yahweh.
All those who were with him went up and approached the city, arriving opposite Ai, and camped to the north of it, with a valley between them and the city.
The military force was stationed in this way: the main camp to the north of the city and its rear guard to the west of the city. And that night Joshua went into the valley.