10 Joshua got up early in the morning and mustered the people. Then he and the elders of Israel went up in front of the people to Ai.
11 The entire army that was with him went up. They moved in close, in front of the city. Then they camped north of Ai, with the valley between them and Ai.
12 He took about five thousand men and positioned them as an ambush between Bethel and Ai to the west of the city.
13 The people positioned the main camp on the north side of the city and its rear guard on its west side. That night, Joshua went into the middle of the valley.
14 As soon as the king of Ai saw this, he and all his troops, the men of the city, hurried out early in the morning to meet Israel in battle. They moved out to the battleground on the slopes down toward the Jordan. He didn’t know that there was an ambush set against him behind the city.
15 Then Joshua and all Israel let themselves be beaten before them. They fled in the direction of the desert.
16 Next, all the troops who were still in the city were called out to chase them. They chased after Joshua and so let themselves be drawn away from the city.