The main fighting force north of the city prepared for battle, while the rear guard held a concealed position west of the city. Joshua spent the night in the valley.
At dawn, when the king of Ai saw the Israelites, he and his army rushed out to fight. They ran to attack Israel at a predetermined place en route to the Arabah, not knowing that an ambush had been set against them behind the city.