1The LORD said to Joshua, "Do not be afraid or discouraged. Take all the troops with you and go attack Ai. Look, I have handed over to you the king of Ai, his people, city, and land.
2Treat Ai and its king as you did Jericho and its king, except that you may plunder its spoil and livestock for yourselves. Set an ambush behind the city."
6They will come after us until we have drawn them away from the city, for they will say, 'They are fleeing from us as before.' While we are fleeing from them,
9So Joshua sent them out, and they went to the ambush site and waited between Bethel and Ai, to the west of Ai. But he spent that night with the troops.
11All those who were with him went up and approached the city, arriving opposite Ai, and camped to the north of it, with a valley between them and the city.
13The troops were stationed in this way: the main camp to the north of the city and its rear guard to the west of the city. And that night Joshua went into the valley.
14When the king of Ai saw the Israelites, the men of the city hurried and went out early in the morning so that he and all his people could engage Israel in battle at a suitable place facing the Arabah. But he did not know there was an ambush waiting for him behind the city.
18Then the LORD said to Joshua, "Hold out the javelin in your hand toward Ai, for I will hand the city over to you." So Joshua held out his javelin toward it.
19When he held out his hand, the men in ambush rose quickly from their position. They ran, entered the city, captured it, and immediately set it on fire.
20The men of Ai turned and looked back, and smoke from the city was rising to the sky! They could not escape in any direction, and the troops who had fled to the wilderness now became the pursuers.
21When Joshua and all Israel saw that the men in ambush had captured the city and that smoke was rising from it, they turned back and struck down the men of Ai.
22Then men in ambush came out of the city against them, and the men of Ai were trapped between the Israelite forces, some on one side and some on the other. They struck them down until no survivor or fugitive remained,
24When Israel had finished killing everyone living in Ai who had pursued them into the open country, and when every last one of them had fallen by the sword, all Israel returned to Ai and struck it down with the sword.
29He hung the body of the king of Ai on a tree until evening, and at sunset Joshua commanded that they take his body down from the tree. They threw it down at the entrance of the city gate and put a large pile of rocks over it, which still remains today.
31just as Moses the LORD's servant had commanded the Israelites. He built it according to what is written in the book of the law of Moses: an altar of uncut stones on which no iron tool has been used. Then they offered burnt offerings to the LORD and sacrificed fellowship offerings on it.
33All Israel--resident alien and citizen alike--with their elders, officers, and judges, stood on either side of the ark of the LORD's covenant facing the Levitical priests who carried it. Half of them were in front of Mount Gerizim and half in front of Mount Ebal, as Moses the LORD's servant had commanded earlier concerning blessing the people of Israel.
35There was not a word of all that Moses had commanded that Joshua did not read before the entire assembly of Israel, including the women, the dependents, and the resident aliens who lived among them.