All the people of war with him went up, advanced, and came in front of the city. They camped to the north of Ai, with a valley between him and Ai.
Then Joshua rose up early in the morning and mustered the people. He and the elders of Israel marched before the people to Ai.
But he had taken about 5,000 men and set them in ambush between Bethel and Ai, to the west of the city.