Thence he removed to the mountain on the east of Bethel, and pitched his tent, with Bethel on the west and Ai on the east; and there he built an altar to the Lord and called on the name of the Lord.
And all the fighting men who were with him went up, and drew near before the city, and encamped on the north side of Ai, with a ravine between them and Ai.
So they stationed the forces, the main encampment which was north of the city and its rear guard west of the city. But Joshua spent that night in the valley.