Then the LORD said to Joshua, “Do not fear or be dismayed; take all the fighting men with you, and go up now to Ai. See, I have handed over to you the king of Ai with his people, his city, and his land. You shall do to Ai and its king as you did to Jericho and its king; only its spoil and its livestock you may take as booty for yourselves. Set an ambush against the city, behind it.”
So Joshua and all the fighting men set out to go up against Ai. Joshua chose thirty thousand warriors and sent them out by night with the command, “You shall lie in ambush against the city, behind it; do not go very far from the city, but all of you stay alert. I and all the people who are with me will approach the city. When they come out against us, as before, we shall flee from them. They will come out after us until we have drawn them away from the city; for they will say, ‘They are fleeing from us, as before.’ While we flee from them, you shall rise up from the ambush and seize the city; for the LORD your God will give it into your hand. And when you have taken the city, you shall set the city on fire, doing as the LORD has ordered; see, I have commanded you.” (Joshua 8:1-8)
Israel had suffered a bitter defeat. Achan had stolen what had belonged to God at Jericho and the Israelites had suffered for his crime.
The Israelites had been slaves four hundred years and God kept them from battle as long as he could (see Exodus 13:17). Until Ai, he had given them only victories. Ai had been their first defeat since entering the Promised Land.
The Canaanites were not a unified nation. Instead, they were a conglomeration of competing cities scattered across hundreds of square miles. Each city would have to be defeated separately. The war that Joshua began would have to go on until every last Canaanite city was defeated: and there were hundreds of cities, some large, some small, ranging in population from a hundred thousand to a few hundred. Ai was a small village. But it was walled and set on a hill. Despite its size, it was not a simple matter to conquer. But God reassured his people: their previous loss, their subsequent fear, did not mean that God was not still with them. Victory was certain despite how things looked because victory was not dependent upon them, or the size of their faith. It was dependent upon the size of their God.