1 The Lord said to Joshua, "Don’t be afraid or terrified. Take the entire army with you. Start to go up to Ai. Look! I have given the king of Ai, his people, his city, and his land into your power.
2 Do to Ai and its king what you did to Jericho and its king. But you may take its booty and cattle as plunder. Set your ambush behind the city."
3 So Joshua and the whole army got ready to go up to Ai. Joshua chose thirty thousand brave soldiers. He sent them out by night.
4 He commanded them, "Look. You are to ambush the city from behind. Don’t move too far away from the city. Be ready, all of you.
5 I will approach the city with all the people. When they come out against us the same way as before, we will flee from them.
6 They will come out after us until we have drawn them away from the city. They will think, They are fleeing from us as before. So we will flee from them.
7 But you will rise up from the ambush and take over the city. The Lord your God will give it into your power.
8 As soon as you seize the city, set it on fire. Act according to the Lord’s word. Indeed, I have given you an order!"
9 Joshua sent them off, and they went to set the ambush. They stayed between Bethel and Ai, to the west of Ai. Joshua spent that night among the people.
10 Joshua got up early in the morning and mustered the people. Then he and the elders of Israel went up in front of the people to Ai.
11 The entire army that was with him went up. They moved in close, in front of the city. Then they camped north of Ai, with the valley between them and Ai.
12 He took about five thousand men and positioned them as an ambush between Bethel and Ai to the west of the city.
13 The people positioned the main camp on the north side of the city and its rear guard on its west side. That night, Joshua went into the middle of the valley.
14 As soon as the king of Ai saw this, he and all his troops, the men of the city, hurried out early in the morning to meet Israel in battle. They moved out to the battleground on the slopes down toward the Jordan. He didn’t know that there was an ambush set against him behind the city.
15 Then Joshua and all Israel let themselves be beaten before them. They fled in the direction of the desert.
16 Next, all the troops who were still in the city were called out to chase them. They chased after Joshua and so let themselves be drawn away from the city.
17 No one who hadn’t gone out after Israel was left in either Ai or Bethel. They left the city wide open and chased after Israel.
18 The Lord said to Joshua, "Point the dagger in your hand toward Ai, because I will give it into your power." So Joshua pointed the dagger in his hand toward the city.
19 The ambush quickly rose from its place. As soon as he reached out his hand, it charged. They entered the city and captured it. They set the city on fire at once.
20 Then the men of Ai turned around. They caught sight of the smoke of the city rising toward the sky. They had no chance to flee one way or the other. The troops who were fleeing toward the desert turned against the pursuit.
21 Joshua and all Israel saw that the ambush had captured the city and that the smoke of the city was rising. So they turned and struck down the men of Ai.
22 When other Israelites came out of the city to confront them, the men of Ai were caught in the middle. Some Israelites were on one side of them and some on the other. The Israelites struck them down until there was no one left to escape.
23 But they seized the king of Ai alive and brought him to Joshua.
24 Israel finished killing the entire population of Ai that had chased them out into the open wasteland. All of them were finished off without mercy. Then all Israel went back to Ai and struck it down without mercy.
25 Twelve thousand men and women died that day, all the people of Ai.
26 Joshua didn’t pull back the hand that was stretched out holding a dagger until he had wiped out the whole population of Ai as something reserved for God.
27 However, Israel did take the cattle and other booty of that city as plunder for themselves, in agreement with the command that the Lord had given Joshua.
28 Then Joshua burned Ai. He made it a permanently deserted mound. That is still the case today.
29 He hanged the king of Ai on a tree until evening. At sundown, Joshua gave an order, and they took his body down from the tree. They threw it down at the opening of the city gate. Then they raised over it a great pile of stones that is still there today.
30 Then Joshua built an altar on Mount Ebal to the Lord, the God of Israel.
31 This was exactly what Moses the Lord’s servant had commanded the Israelites. It is what is written in the Instruction scroll from Moses: "an altar of crude stones against which no iron tool has swung." On it they offered entirely burned offerings to the Lord and sacrificed well-being offerings.
32 There, in the presence of the Israelites, Joshua wrote on the stones a copy of the Instruction from Moses, which Moses had written earlier.
33 All Israel—with its elders, officers, and judges—were standing on either side of the chest. They were facing the levitical priests who carry the Lord’s chest containing the covenant. They included both immigrants and full citizens. Half stood facing Mount Gerizim and half stood facing Mount Ebal. This was exactly what Moses the Lord’s servant had initially commanded for the blessing of the Israelite people.
34 Afterward, Joshua read aloud all the words of the Instruction, both blessing and curse, in agreement with everything written in the Instruction scroll.
35 There wasn’t a single word of all that Moses had commanded that Joshua failed to read aloud in the presence of the entire assembly of Israel. This assembly included the women and small children, along with the immigrants who lived among them.