[8:1] The Lord said to Joshua, “Take all the soldiers with you and go on up to Ai. Don't be afraid or discouraged. I will give you victory over the king of Ai; his people, city, and land will be yours.
[8:2] You are to do to Ai and its king what you did to Jericho and its king, but this time you may keep its goods and livestock for yourselves. Prepare to attack the city by surprise from the rear.”
[8:3] So Joshua got ready to go to Ai with all his soldiers. He picked out thirty thousand of his best troops and sent them out at night
[8:4] with these orders: “Hide on the other side of the city, but not too far away from it; be ready to attack.
[8:5] My men and I will approach the city. When the men of Ai come out against us, we will turn and run, just as we did the first time.
[8:6] They will pursue us until we have led them away from the city. They will think that we are running from them, as we did before.
[8:7] Then you will come out of hiding and capture the city. The Lord your God will give it to you.
[8:8] After you have taken the city, set it on fire, just as the Lord has commanded. These are your orders.”
[8:9] So Joshua sent them out, and they went to their hiding place and waited there, west of Ai, between Ai and Bethel. Joshua spent the night in camp.
[8:10] Early in the morning Joshua got up and called the soldiers together. Then he and the leaders of Israel led them to Ai.
[8:11] The soldiers with him went toward the main entrance to the city and set up camp on the north side, with a valley between themselves and Ai.
[8:12] He took about five thousand men and put them in hiding west of the city, between Ai and Bethel.
[8:13] The soldiers were arranged for battle with the main camp north of the city and the rest of the men to the west. Joshua spent the night in the valley.
[8:14] When the king of Ai saw Joshua's men, he acted quickly. He and all his men went out toward the Jordan Valley to fight the Israelites at the same place as before, not knowing that he was about to be attacked from the rear.
[8:15] Joshua and his men pretended that they were retreating, and ran away toward the barren country.
[8:16] All the men in the city had been called together to go after them, and as they pursued Joshua, they kept getting farther away from the city.
[8:17] Every man in Ai went after the Israelites, and the city was left wide open, with no one to defend it.
[8:18] Then the Lord said to Joshua, “Point your spear at Ai; I am giving it to you.” Joshua did as he was told,
[8:19] and as soon as he lifted his hand, the men who had been hiding got up quickly, ran into the city and captured it. They immediately set the city on fire.
[8:20] When the men of Ai looked back, they saw the smoke rising to the sky. There was no way for them to escape, because the Israelites who had run toward the barren country now turned around to attack them.
[8:21] When Joshua and his men saw that the others had taken the city and that it was on fire, they turned around and began killing the men of Ai.
[8:22] The Israelites in the city now came down to join the battle. So the men of Ai found themselves completely surrounded by Israelites, and they were all killed. No one got away, and no one lived through it
[8:23] except the king of Ai. He was captured and taken to Joshua.
[8:24] The Israelites killed every one of the enemy in the barren country where they had chased them. Then they went back to Ai and killed everyone there.
[8:27] The Israelites kept for themselves the livestock and goods captured in the city, as the Lord had told Joshua.
[8:28] Joshua burned Ai and left it in ruins. It is still like that today.
[8:29] He hanged the king of Ai from a tree and left his body there until evening. At sundown Joshua gave orders for the body to be removed, and it was thrown down at the entrance to the city gate. They covered it with a huge pile of stones, which is still there today.