NOT far from Jericho there was a small city called Ai. It was the same place that is called Hai in Genesis 12:8. Joshua sent men from Jericho to Ai, to visit it, and to view the country near it. When these men returned, they told Joshua that the men of Ai were few, and that two or three thousand men would be enough to take the city. So Joshua sent up three thousand men; but the men of Ai came out and chased them, killing quite a number, and driving the others back to Jericho.

Then Joshua fell upon his face before the ark, and cried to the Lord in great distress; but the Lord told him to rise up, and put away the evil from among the people. He told Joshua that the people had stolen, and deceived, and had hid the stolen things among their own stuff; that this was the reason why they could not stand before their enemies; and that those who had done this wicked thing must be destroyed.

The Lord told Joshua to cast lots among the people. When this had been done, the lot fell upon Achan, the son of Carmi. Then Joshua said to Achan, "My son, give, I pray thee, glory to the Lord God of Israel, and make confession unto him; and tell me now what thou hast done; hide it not from me." Then Achan confessed that when Jericho was destroyed he had taken from the spoils a costly garment, two hundred shekels of silver, and a wedge of gold; and that they were now hid in the earth, in the midst of his tent. So Achan was stoned to death in the valley of Achor, and all that he had was burned.

After this the Lord told Joshua how to take the city of Ai. Thirty thousand men went up by night, and lay in ambush on the west side of the city. In the morning, Joshua went up with an army, and when they came near the city, the men of Ai rushed forth, expecting to drive them back as they had done before. At first, Joshua and his army fled. Then Joshua held forth his spear, and the men who were in ambush behind the city came forth, entered the open gates, and set the city on fire. Then the Israelites turned upon the people of Ai and slew them all.