1Yahweh said to Joshua, “Do not be afraid or be dismayed. Take all the people of war with you and arise, go up to Ai. Behold, I have given into your hand the king of Ai and his people and his city and his land.
2You are to do to Ai and her king as you did to Jericho and her king, except its spoil and its livestock you may take as plunder for yourselves. Set for yourself an ambush behind the city.”
3So Joshua and all the people of war rose up to go up to Ai. And Joshua chose 30,000 men, mighty men of valor, and sent them out by night.
4And he commanded them, saying, “Behold, you are to lie in ambush against the city, behind the city. Do not go very far from the city, but all of you be ready.
5I and all the people who are with me will approach the city, and when they come out against us like they did the first time, we will flee before them.
6They will come out after us until we have drawn them away from the city; for they will say, ‘They are fleeing before us like the first time!’ So we will flee before them.
7Then you are to rise up from the ambush and take possession of the city, for Yahweh your God will give it into your hand.
8And it will be when you have seized the city, that you are to set the city on fire. You are to do according to the word of Yahweh. See, I have commanded you.”
9Joshua sent them out, and they went to set up the ambush and stayed between Bethel and Ai on the west side of Ai, but Joshua stayed among the people that night.
10Joshua rose up early in the morning and mustered the people; then he went up, he and the elders of Israel, before the people to Ai.
11All the people, even the men of war who were with him, went up and drew near, and came in front of the city and encamped on the north side of Ai, and there was a ravine between him and Ai.
12He had taken about 5,000 men and had set them in ambush between Bethel and Ai on the west side of the city.
13So they stationed the people, all the army that was on the north of the city and the rear guard on the west of the city. And Joshua went that night into the midst of the valley.
14And it came to pass when the king of Ai saw it, that they hurried and rose up early, and the men of the city went out against Israel to battle, he and all his people to the appointed place facing the Arabah, but he did not know that there was an ambush against him behind the city.
15And Joshua and all Israel acted as if they were beaten before them and fled by the road to the wilderness.
16All the people who were in the city were called together to pursue after them. They pursued Joshua and were drawn away from the city.
17There was not a man left in Ai or Bethel who did not go out after Israel. They left the city open and pursued Israel.
18Then Yahweh said to Joshua, “Stretch out the javelin that is in your hand toward Ai, for I will give it into your hand.” So Joshua stretched out the javelin that was in his hand toward the city,
19and the ambush arose quickly out of their place and ran as soon as he had stretched out his hand. And they entered into the city and they captured it and they hurried and set the city on fire.
20And the men of Ai turned and looked behind them, and behold, the smoke of the city ascended up to heaven, and they had no ability to flee this way or that way. And the people who had been fleeing toward the wilderness turned back on the pursuers.
21When Joshua and all Israel saw that the ambush had taken the city and that the smoke of the city ascended, then they turned back and struck down the men of Ai.
22And the other Israelites came out of the city against them so they were in the middle of Israel, some on this side and some on that side. And they struck them down, so that they left no survivor or escapee.
23And they captured the king of Ai alive and brought him to Joshua.
24It came to pass, when Israel had made an end of killing all the inhabitants of Ai in the field and in the wilderness where they pursued them, and they had all fallen by the mouth of the sword until they were finished off, that all Israel returned to Ai and struck it with the mouth of the sword.
25And all those who fell that day, both men and women, were 12,000, all the people of Ai.
26And Joshua did not draw back his hand with which he stretched out the javelin until he had devoted all the inhabitants of Ai to destruction.
27Israel took only the livestock and the spoil of that city as plunder for themselves, according to the word of Yahweh that he commanded Joshua.
28So Joshua burned Ai and made it a perpetual mound of ruins, a desolation, to this day.
29And he hanged the king of Ai on a tree until the evening. And at sunset Joshua commanded and they took his body down from the tree and threw it at the entrance of the gate of the city and raised over it a great heap of stones that remains to this day.
30Then Joshua built an altar to Yahweh, the God of Israel, on Mount Ebal,
31as Moses the servant of Yahweh had commanded the children of Israel, as it is written in the book of the law of Moses: an altar of uncut stones on which no one had lifted up any iron. Then they offered burnt offerings on it to Yahweh and sacrificed peace offerings.
32And there he wrote upon the stones a copy of the law of Moses, which he had written in the presence of the children of Israel.
33All Israel and their elders and officers and their judges stood on opposite sides of the ark, before the Levitical priests, the Levites, who carried the ark of Yahweh’s covenant—the foreigner and citizen alike—half of them in front of Mount Gerizim and half of them in front of Mount Ebal, just as Moses the servant of Yahweh had commanded earlier, to bless the people of Israel.
34After that, he read all the words of the law, the blessing and the curse, according to all that is written in the book of the law.
35There was not a word of all that Moses had commanded that Joshua did not read before all the assembly of Israel, and the women, and the little ones and the foreigners who walked in their midst.