1The LORD said to Joshua, "Do not be afraid, and do not lose heart. Take all the fighting men with you, and get up and go to Ai. Look, I have given into your hand the king of Ai, his people, his city and his land."
2"You shall do to Ai and her king as you did to Jericho and her king. But this time you may take the goods and the cattle of the city for yourselves. Set an ambush for the city, behind it."
3So Joshua got up, and all the fighting men with him, to go up against Ai. Joshua chose thirty thousand strong and brave men, and sent them out by night.
4He commanded them, "Listen. You are to hide and wait for the city, behind the city. Do not go very far from the city, but all of you stay ready."
5"I and all the people who are with me will come near the city. When they come out against us, as they did the first time, we will run away from them."
6"They will come out after us until we have drawn them away from the city. For they will say, 'They are running away from us, as they did the first time.' So we will run away from them."
7"Then you shall rise up from your hiding place and take the city. For the LORD your God will give it into your hand."
8"When you have taken the city, you shall set the city on fire. Do what the LORD has commanded. See, I have given you your orders."
9So Joshua sent them out. They went to their hiding place and waited between Bethel and Ai, on the west side of Ai. But Joshua stayed that night among the people.
10Joshua got up early in the morning and counted the people. Then he and the elders of Israel went up ahead of the people to Ai.
11All the people, the fighting men who were with him, went up. They came near and stood in front of the city, and camped on the north side of Ai. There was a valley between them and Ai.
12He took about five thousand men and set them to hide and wait between Bethel and Ai, on the west side of the city.
13So they placed the people: the whole army on the north of the city, and the men hiding on the west of the city. That night Joshua went into the middle of the valley.
14When the king of Ai saw this, the men of the city hurried and got up early. He and all his people went out against Israel to battle, at the appointed place in front of the plain. But he did not know that men were hiding to attack him behind the city.
15Joshua and all Israel acted as if they were beaten, and ran away along the road to the wilderness.
16All the people who were in Ai were called together to chase them. They chased after Joshua and were drawn away from the city.
17Not a man was left in Ai or Bethel who did not go out after Israel. They left the city wide open and chased after Israel.
18The LORD said to Joshua, "Stretch out the spear that is in your hand toward Ai, for I will give it into your hand." So Joshua stretched out the spear that was in his hand toward the city.
19The men who were hiding rose up quickly from their place and ran as soon as he stretched out his hand. They went into the city and took it, and they hurried and set the city on fire.
20When the men of Ai looked behind them, they saw the smoke of the city going up to the sky. They had no power to run this way or that way. And the people who had run to the wilderness turned back on the ones chasing them.
21When Joshua and all Israel saw that the men in hiding had taken the city, and that the smoke of the city was going up, they turned back and killed the men of Ai.
22The others came out of the city against them, so the men of Ai were in the middle of Israel, with some on this side and some on that side. Israel struck them down, and let none of them remain or escape.
23They took the king of Ai alive, and brought him to Joshua.
24When Israel had finished killing all the people of Ai in the open country, in the wilderness where they had chased them, and when they had all fallen by the edge of the sword until they were destroyed, then all the Israelites went back to Ai and struck it with the edge of the sword.
25All who fell that day, both men and women, were twelve thousand, all the people of Ai.
26For Joshua did not draw back the hand in which he held out the spear, until he had completely destroyed all the people of Ai.
27Only the cattle and the goods of that city Israel took for themselves, as the LORD had told Joshua.
28Joshua burned Ai and made it a heap of ruins for ever, a waste place to this day.
29He hanged the king of Ai on a tree until evening. As soon as the sun went down, Joshua commanded that they should take his body down from the tree and throw it down at the entrance of the city gate, and raise over it a great heap of stones, which is there to this day.
30Then Joshua built an altar to the LORD God of Israel on Mount Ebal,
31as Moses the servant of the LORD had commanded the children of Israel, and as it is written in the book of the law of Moses: an altar of whole stones, on which no man had lifted up any iron tool. On it they offered burnt offerings to the LORD, and sacrificed peace offerings.
32There he wrote on the stones a copy of the law of Moses, which he wrote in front of the children of Israel.
33All Israel, with their elders, officers and judges, stood on both sides of the ark, facing the priests the Levites, who carried the ark of the covenant of the LORD. The stranger stood there as well as the one born among them. Half of them stood in front of Mount Gerizim, and half of them in front of Mount Ebal, just as Moses the servant of the LORD had commanded before, that they should bless the people of Israel.
34After that he read all the words of the law, the blessings and the curses, just as everything is written in the book of the law.
