8 The Lord said to Joshua, “Do not be afraid. Take all the men of war with you and go up to Ai. See, I have given the king of Ai into your hand, his people, his city, and his land. 2 Do the same to Ai and its king as you did to Jericho and its king. Take only its riches and its cattle for yourselves. Hide men behind the city to fight against it.”
3 So Joshua and all the men of war got ready to go up to Ai. Joshua chose 30,000 strong soldiers, and sent them out during the night. 4 He told them, “See, you are going to fight the city from behind it. Do not go very far from the city, but all of you be ready. 5 I and all the people will come near the city. When they come out to meet us as they did before, we will run from them. 6 They will come out after us until we have taken them away from the city. For they will say, ‘They are running from us as they did before.’ So we will run from them. 7 Then you will come out of your hiding place and take the city. The Lord will give it to you. 8 When you have taken the city, set it on fire. Do what the Lord says. See, I have told you.” 9 When Joshua sent them away, they went to the hiding place. They waited between Bethel and Ai, on the west side of Ai. But Joshua stayed that night among the people.
10 Joshua got up early in the morning and gathered the people. Then he went up with the leaders of Israel in front of the people to Ai. 11 All the men of war who were with him went up and came to the front of the city. They stayed on the north side of Ai. There was a valley between him and Ai. 12 Then he took about 5,000 men and hid them between Bethel and Ai, on the west side of the city. 13 So they put the men in their places. There was the army on the north side of the city, and the secret army on the west side of the city. But Joshua stayed that night in the center of the valley. 14 The king of Ai saw this. So the men of the city were quick to get up early and go out to meet Israel in battle at the chosen place near the desert plain. But he did not know that there was an army hiding behind the city. 15 Joshua and all Israel pretended to be beaten in front of them. And they ran away into the desert. 16 All the people in the city were called together to go after them. They went after Joshua, and were taken away from the city. 17 So not a man was left in Ai or Bethel who had not gone out after Israel. They left the city open and ran after Israel.
18 Then the Lord said to Joshua, “Hold out the spear that is in your hand toward Ai. For I will give the city to you.” So Joshua held out the spear that was in his hand toward the city. 19 The men who were hiding got up in a hurry from their place and ran when he held out his hand. They went into the city and took it, and were quick to set it on fire. 20 When the men of Ai looked back, they saw the smoke of the city going up to the sky. They had no place to run. Then the people of Israel who had been running away in the desert turned against those who went after them. 21 Joshua and all Israel saw that the men who had been hiding had taken the city. They saw the smoke from the city, so they turned around and killed the men of Ai. 22 The others came out from the city to meet them. The men of Ai were caught in the center of Israel. There were some on one side and some on the other side. They killed until no one was left alive. No one got away. 23 But they took the king of Ai alive and brought him to Joshua.
24 Israel killed all the men of Ai in the field and in the desert where they had run after them. All of them were killed with the sword until they were destroyed. Then all Israel returned to Ai and destroyed it with the sword. 25 All the men and women of Ai died that day, 12,000 in all. 26 Joshua did not put down his hand he used to hold out the spear until he had destroyed all the people of Ai. 27 Israel took only the cattle and the riches of that city for themselves, as the Lord had told Joshua. 28 So Joshua burned Ai and destroyed it forever, as it is to this day. 29 He hanged the king of Ai on a tree until evening. When the sun went down, Joshua had them take his body down from the tree and throw it down at the gate of the city. They put many stones over it, and they are there to this day.
30 Then Joshua built an altar to the Lord, the God of Israel, at Mount Ebal. 31 It was built just as the Lord’s servant Moses had told the people of Israel, as it is written in the book of the Law of Moses. It was an altar made of stones which had not been cut. No one had used an iron object on them. On the altar they gave burnt gifts in worship to the Lord. And there they gave peace gifts in worship. 32 There Joshua wrote on the stones the Law of Moses in front of the people of Israel. 33 All Israel stood on both sides of the special box, in front of the Levite religious leaders who carried the special box of the agreement of the Lord. Strangers stood there as well as those born among the people, with their leaders and heads and men who judge between what is right or wrong. Half of them stood in front of Mount Gerizim. The other half stood in front of Mount Ebal. They did just as the Lord’s servant Moses had told them before. They prayed for good to come to the people of Israel. 34 After this Joshua read all the words of the Law, the good and the bad that will happen. He read all that is written in the book of the Law. 35 There was not a word of all that Moses had said which Joshua did not read. He read it in front of all the people of Israel, with the women and children and strangers who were living among them.