So Joshua arose, and all the people of war,
to go up against Ai:
and Joshua chose out thirty thousand mighty men of valor,
and sent them away by night.
Joshua 8:3
"The first battle, which Israel lost because of Aachan’s perfidy, took place by 3,000 warriors coming up on the ridges from Jericho until they came within sight of Ai. It is possible to see Kh. Nisya very well from the top of the deep Wadi Sheiban (Heb. ). Sheiban begins at Beitin and farther down becomes Wadi Qelt going down to Jericho.On our map we have noted (lower right) the morad or “descent” down which the frantic Israelite force fled until they came to the shevarim. There, because the defile was so narrow, they turned to fight and 36 lost their lives before everyone could get through the narrow place (shevarim). Huge
boulders are splitting off and falling down into the wadi to this day, ever widening the opening.
After taking care of the Aachan situation, Joshua went up himself for the second battle, with 10 times as many warriors -- 30,000. This time the main force worked their way into the valley north of Ai and Joshua positioned himself above them, visible to the ambush. The latter had split off from the main force and went up Wadi el-Ein (Heb. ) and then up to and behind the ridge of Jebel et-Tawil (marked on the above map by a red line going southeastward from the mountain top). There they were completely out of sight of the Bethelites as well as the watchmen of Ai.
We want to note an important point here. That is, hand-to-hand fighting with swords is by its very nature a close-up endeavor. We are not dealing with tanks and machine guns, nor anything that sends out projectiles, except for slingshots and bows and arrows. Thus, no great expansive place is necessary for a battle to take place, especially in the rough hill country of the highlands of Israel.
Some argue that the situation around Kh. Nisya is too small an area for such a battle to take place. However, that all speaks in its favor, and gives no good reason against the battle taking place here! One must stand at the north end of Kh. Nisya and look down into the deep valley between the gate and Joshua. 30,000 men could easily have gathered in the valley (as we have noted), and then pretend to run away in both directions, even as the 3,000 had done. This ruse pulled the men of Ai and Bethel out of the city and down into the valley, after which Israel bottled them up and destroyed them."
Dr. David Livingston