8 Eternal One (to Joshua): Don’t be afraid or discouraged. Take all of your fighters up to Ai. Watch; I will hand over the king of Ai, his people, his city, and his land to you. 2 You will do to Ai exactly as you did to Jericho and its king, except you may keep only the cattle and spoil for yourselves. Set an ambush behind the city.
3 So Joshua and all his fighting force got ready to depart for Ai, and he chose 30,000 of them and sent them out by night 4 with instructions.
Joshua: I want you all to lie in wait behind the city in ambush. Stay close, and stay alert. 5 I will bring the others up to the front of the city; and when they come out to fight us, we will run from them. 6 Their forces will all come out of the city to chase us because they will think everything is happening the way it did the first time. But when we have lured them all out and away from the city, 7 I want you to move in and take it, for the Eternal One, your God will give it to us. 8 When you have taken the city, burn it. This is the word of the Eternal and my command.
9 The ambush force made its way into the hills and took a position between Bethel and Ai, while Joshua and the remaining fighters spent the night in the camp. 10 In the morning, Joshua rose early and roused the people, and he and the elders went on to Ai in front of the people. 11 All the fighting men with him went up and moved in close to the city and set up camp in front and north of Ai, with a ravine between the camp and Ai. 12 The other force, numbering about 5,000, remained hidden west of the city between Bethel and Ai. 13 With his forces situated with men to the north and west of the city, Joshua camped in the valley that night.
14 When the king of Ai arose the next morning and saw the Israelites lined up against him, he gathered his forces on the plain to bring the battle to Israel, not knowing that an ambush squad was hidden behind the city. 15 When the battle was joined, Joshua and the Israelites pretended they were defeated and once again were fleeing toward the wilderness. 16 All of the men of Ai came out to pursue them and were drawn farther and farther away from the city. 17 At last, not one man was left in Ai or Bethel, since all had gone out to pursue Israel, leaving the city open and defenseless.
Eternal One (to Joshua): 18 Raise your javelin toward Ai, for now I will give it into your hands.
Joshua raised his javelin toward the city; 19 and as he did so, the forces he had hidden in ambush rushed into the city, seizing it and setting it on fire.
20-21 The men of Ai looked back and saw the smoke rising from their city into the sky; and when Joshua saw that his ambush had been successful, he turned the fleeing Israelites around to crush the disheartened men of Ai. There was nowhere for the men of the city to retreat. Before them, the Israelites turned to attack; 22 behind them, the ambush force came out against them from the burning city. So they were surrounded on all sides by their attackers, who killed all of them, 23 except for Ai’s king, who was captured alive and carried to Joshua.
24 When the last of Ai’s men in the field and wilderness had been killed by the sword, the Israelites returned to Ai and killed everyone inside the city. 25 Twelve thousand fell that day—men and women, all of the people of Ai, 26 for Joshua did not lower his javelin until the destruction was complete. 27 The people of Israel then took the livestock and the goods of the city for themselves, as the Eternal One had instructed Joshua to do. 28 So Joshua burned Ai and made it a city of ruins, as it is to this day, 29 and he executed the king of Ai by hanging. At sunset Joshua had them take down his body for burial, as the law commands, put it where once the city gate had stood, and heap over his body a grave of stones that still stands to this day.
30 Then Joshua built an altar to the Eternal God of Israel on Mount Ebal. 31 He had it built just as Moses, the Lord’s servant, had commanded the Israelites and is recorded in the book of the law,[a] an altar of stones that had not been cut with iron tools. They offered sacrifices to the Eternal there—burnt offerings and peace offerings— 32 and with the Israelites gathered, Joshua had the law of Moses engraved on the stones. 33 Israel, the elders, the officers, and the judges gathered around the covenant chest of the Eternal, which was carried by the Levite priests, a gathering Moses had commanded, including Israelites and sojourners. They lined the valley, half in front of Mount Ebal and half in front of Mount Gerizim, as Moses, servant of the Eternal One, had commanded before he died, so that the people could be blessed. 34-35 Joshua read out all the words of the law, blessings and curses alike. Every word written, every word that Moses had commanded, Joshua read to the men, women, and children of Israel, and to the sojourners residing among them.