Joshua 8:11

And all the people, even the people of war that were with him, went up, and drew nigh, and came before the city, and pitched on the north side of Ai: now there was a valley between them and Ai.

The verse belongs to Israel's march from Gilgal to overthrow and conquer Ai, placing the people of war near the city as part of that conquest. It describes the renewed, second advance against Ai after the sentence on Achan was carried out and God's wrath was turned away from Israel. Joshua was commanded to marshal all the men of war and go up again against Ai, and the army moved against the city and took position near it.

With God's power accompanying them, the armies of Heaven fought for Israel, their enemies were put to flight, and they soon took possession of the city. The victory came through obedience to God, in whom alone was Israel's hope. That victory opened the way for continued battle, with fresh courage in every victory, the conquest of the whole land, and the fulfillment of all the good promises God had spoken to Israel.