7:1 But the people of Israel broke faith in regard to the devoted things, for Achan the son of Carmi, son of Zabdi, son of Zerah, of the tribe of Judah, took some of the devoted things. And the anger of the Lord burned against the people of Israel.
2 Joshua sent men from Jericho to Ai, which is near Beth-aven, east of Bethel, and said to them, “Go up and spy out the land.” And the men went up and spied out Ai. 3 And they returned to Joshua and said to him, “Do not have all the people go up, but let about two or three thousand men go up and attack Ai. Do not make the whole people toil up there, for they are few.” 4 So about 3,000 men went up there from the people. And they fled before the men of Ai, 5 and the men of Ai killed about thirty-six of their men and chased them before the gate as far as Shebarim and struck them at the descent. And the hearts of the people melted and became as water.
6 Then Joshua tore his clothes and fell to the earth on his face before the ark of the Lord until the evening, he and the elders of Israel. And they put dust on their heads. 7 And Joshua said, “Alas, O Lord God, why have you brought this people over the Jordan at all, to give us into the hands of the Amorites, to destroy us? Would that we had been content to dwell beyond the Jordan! 8 O Lord, what can I say, when Israel has turned their backs before their enemies! 9 For the Canaanites and all the inhabitants of the land will hear of it and will surround us and cut off our name from the earth. And what will you do for your great name?”
10 The Lord said to Joshua, “Get up! Why have you fallen on your face? 11 Israel has sinned; they have transgressed my covenant that I commanded them; they have taken some of the devoted things; they have stolen and lied and put them among their own belongings. 12 Therefore the people of Israel cannot stand before their enemies. They turn their backs before their enemies, because they have become devoted for destruction. I will be with you no more, unless you destroy the devoted things from among you. 13 Get up! Consecrate the people and say, ‘Consecrate yourselves for tomorrow; for thus says the Lord, God of Israel, “There are devoted things in your midst, O Israel. You cannot stand before your enemies until you take away the devoted things from among you.” 14 In the morning therefore you shall be brought near by your tribes. And the tribe that the Lord takes by lot shall come near by clans. And the clan that the Lord takes shall come near by households. And the household that the Lord takes shall come near man by man. 15 And he who is taken with the devoted things shall be burned with fire, he and all that he has, because he has transgressed the covenant of the Lord, and because he has done an outrageous thing in Israel.’”
16 So Joshua rose early in the morning and brought Israel near tribe by tribe, and the tribe of Judah was taken. 17 And he brought near the clans of Judah, and the clan of the Zerahites was taken. And he brought near the clan of the Zerahites man by man, and Zabdi was taken. 18 And he brought near his household man by man, and Achan the son of Carmi, son of Zabdi, son of Zerah, of the tribe of Judah, was taken. 19 Then Joshua said to Achan, “My son, give glory to the Lord God of Israel and give praise to him. And tell me now what you have done; do not hide it from me.” 20 And Achan answered Joshua, “Truly I have sinned against the Lord God of Israel, and this is what I did: 21 when I saw among the spoil a beautiful cloak from Shinar, and 200 shekels of silver, and a bar of gold weighing 50 shekels, then I coveted them and took them. And see, they are hidden in the earth inside my tent, with the silver underneath.”
22 So Joshua sent messengers, and they ran to the tent; and behold, it was hidden in his tent with the silver underneath. 23 And they took them out of the tent and brought them to Joshua and to all the people of Israel. And they laid them down before the Lord. 24 And Joshua and all Israel with him took Achan the son of Zerah, and the silver and the cloak and the bar of gold, and his sons and daughters and his oxen and donkeys and sheep and his tent and all that he had. And they brought them up to the Valley of Achor. 25 And Joshua said, “Why did you bring trouble on us? The Lord brings trouble on you today.” And all Israel stoned him with stones. They burned them with fire and stoned them with stones. 26 And they raised over him a great heap of stones that remains to this day. Then the Lord turned from his burning anger. Therefore, to this day the name of that place is called the Valley of Achor.
8:1 And the Lord said to Joshua, “Do not fear and do not be dismayed. Take all the fighting men with you, and arise, go up to Ai. See, I have given into your hand the king of Ai, and his people, his city, and his land. 2 And you shall do to Ai and its king as you did to Jericho and its king. Only its spoil and its livestock you shall take as plunder for yourselves. Lay an ambush against the city, behind it.”
3 So Joshua and all the fighting men arose to go up to Ai. And Joshua chose 30,000 mighty men of valor and sent them out by night. 4 And he commanded them, “Behold, you shall lie in ambush against the city, behind it. Do not go very far from the city, but all of you remain ready. 5 And I and all the people who are with me will approach the city. And when they come out against us just as before, we shall flee before them. 6 And they will come out after us, until we have drawn them away from the city. For they will say, ‘They are fleeing from us, just as before.’ So we will flee before them. 7 Then you shall rise up from the ambush and seize the city, for the Lord your God will give it into your hand. 8 And as soon as you have taken the city, you shall set the city on fire. You shall do according to the word of the Lord. See, I have commanded you.” 9 So Joshua sent them out. And they went to the place of ambush and lay between Bethel and Ai, to the west of Ai, but Joshua spent that night among the people.
10 Joshua arose early in the morning and mustered the people and went up, he and the elders of Israel, before the people to Ai. 11 And all the fighting men who were with him went up and drew near before the city and encamped on the north side of Ai, with a ravine between them and Ai. 12 He took about 5,000 men and set them in ambush between Bethel and Ai, to the west of the city. 13 So they stationed the forces, the main encampment that was north of the city and its rear guard west of the city. But Joshua spent that night in the valley. 14 And as soon as the king of Ai saw this, he and all his people, the men of the city, hurried and went out early to the appointed place toward the Arabah to meet Israel in battle. But he did not know that there was an ambush against him behind the city. 15 And Joshua and all Israel pretended to be beaten before them and fled in the direction of the wilderness. 16 So all the people who were in the city were called together to pursue them, and as they pursued Joshua they were drawn away from the city. 17 Not a man was left in Ai or Bethel who did not go out after Israel. They left the city open and pursued Israel.
18 Then the Lord said to Joshua, “Stretch out the javelin that is in your hand toward Ai, for I will give it into your hand.” And Joshua stretched out the javelin that was in his hand toward the city. 19 And the men in the ambush rose quickly out of their place, and as soon as he had stretched out his hand, they ran and entered the city and captured it. And they hurried to set the city on fire. 20 So when the men of Ai looked back, behold, the smoke of the city went up to heaven, and they had no power to flee this way or that, for the people who fled to the wilderness turned back against the pursuers. 21 And when Joshua and all Israel saw that the ambush had captured the city, and that the smoke of the city went up, then they turned back and struck down the men of Ai. 22 And the others came out from the city against them, so they were in the midst of Israel, some on this side, and some on that side. And Israel struck them down, until there was left none that survived or escaped. 23 But the king of Ai they took alive, and brought him near to Joshua.
24 When Israel had finished killing all the inhabitants of Ai in the open wilderness where they pursued them, and all of them to the very last had fallen by the edge of the sword, all Israel returned to Ai and struck it down with the edge of the sword. 25 And all who fell that day, both men and women, were 12,000, all the people of Ai. 26 But Joshua did not draw back his hand with which he stretched out the javelin until he had devoted all the inhabitants of Ai to destruction. 27 Only the livestock and the spoil of that city Israel took as their plunder, according to the word of the Lord that he commanded Joshua. 28 So Joshua burned Ai and made it forever a heap of ruins, as it is to this day. 29 And he hanged the king of Ai on a tree until evening. And at sunset Joshua commanded, and they took his body down from the tree and threw it at the entrance of the gate of the city and raised over it a great heap of stones, which stands there to this day.
30 At that time Joshua built an altar to the Lord, the God of Israel, on Mount Ebal, 31 just as Moses the servant of the Lord had commanded the people of Israel, as it is written in the Book of the Law of Moses, “an altar of uncut stones, upon which no man has wielded an iron tool.” And they offered on it burnt offerings to the Lord and sacrificed peace offerings. 32 And there, in the presence of the people of Israel, he wrote on the stones a copy of the law of Moses, which he had written. 33 And all Israel, sojourner as well as native born, with their elders and officers and their judges, stood on opposite sides of the ark before the Levitical priests who carried the ark of the covenant of the Lord, half of them in front of Mount Gerizim and half of them in front of Mount Ebal, just as Moses the servant of the Lord had commanded at the first, to bless the people of Israel. 34 And afterward he read all the words of the law, the blessing and the curse, according to all that is written in the Book of the Law. 35 There was not a word of all that Moses commanded that Joshua did not read before all the assembly of Israel, and the women, and the little ones, and the sojourners who lived among them. (ESV)