1The Lord told Joshua, “Don’t be afraid and don’t panic! Take the whole army with you and march against Ai! See, I am handing over to you the king of Ai, along with his people, city, and land. 2Do to Ai and its king what you did to Jericho and its king, except you may plunder its goods and cattle. Set an ambush behind the city.” 3Joshua and the whole army marched against Ai. Joshua selected 30,000 brave warriors and sent them out at night. 4He ordered them, “Look, set an ambush behind the city. Don’t go very far from the city; all of you be ready! 5I and all the troops who are with me will approach the city. When they come out to fight us like before, we will retreat from them.6They will attack us until we have lured them from the city, for they will say, ‘They are retreating from us like before.’ We will retreat from them.7Then you rise up from your hiding place and seize the city. The Lord your God will hand it over to you. 8When you capture the city, set it on fire in keeping with the Lord’s message. See, I have given you orders.” 9Joshua sent them away and they went to their hiding place west of Ai, between Bethel and Ai. Joshua spent that night with the army. 10Bright and early the next morning Joshua gathered the army, and he and the leaders of Israel marched at the head of it to Ai. 11All the troops that were with him marched up and drew near the city. They camped north of Ai on the other side of the valley. 12He took 5,000 men and set an ambush west of the city between Bethel and Ai. 13The army was in position—the main army north of the city and the rear guard west of the city. That night Joshua went into the middle of the valley. 14When the king of Ai and all his people saw Israel, they rushed to get up early. Then the king and the men of the city went out to meet Israel in battle, at the meeting place near the rift valley. But he did not realize an ambush was waiting for him behind the city. 15Joshua and all Israel pretended to be defeated by them, and they retreated along the way to the wilderness. 16All the reinforcements in Ai were ordered to chase them; they chased Joshua and were lured away from the city. 17No men were left in Ai or Bethel; they all went out after Israel. They left the city wide open and chased Israel. 18The Lord told Joshua, “Hold out toward Ai the curved sword in your hand, for I am handing the city over to you.” So Joshua held out toward Ai the curved sword in his hand. 19When he held out his hand, the men waiting in ambush rose up quickly from their place and attacked. They entered the city, captured it, and immediately set it on fire. 20When the men of Ai turned around, they saw the smoke from the city ascending into the sky and were so shocked they were unable to flee in any direction. In the meantime the men who were retreating to the wilderness turned against their pursuers. 21When Joshua and all Israel saw that the men in ambush had captured the city and that the city was going up in smoke, they turned around and struck down the men of Ai. 22At the same time the men who had taken the city came out to fight, and the men of Ai were trapped in the middle. The Israelites struck them down, leaving no survivors or refugees. 23But they captured the king of Ai alive and brought him to Joshua. 24When Israel had finished killing all the men of Ai who had chased them toward the wilderness (they all fell by the sword), all Israel returned to Ai and put the sword to it.25So 12,000 men and women died that day, including all the men of Ai. 26Joshua kept holding out his curved sword until Israel had annihilated all who lived in Ai. 27But Israel did plunder the cattle and the goods of the city, in keeping with the Lord’s orders to Joshua. 28Joshua burned Ai and made it a permanently uninhabited mound (it remains that way to this very day). 29He hung the king of Ai on a tree, leaving him exposed until evening. At sunset Joshua ordered that his corpse be taken down from the tree. They threw it down at the entrance of the city gate and erected over it a large pile of stones (it remains to this very day). 30Then Joshua built an altar for the Lord God of Israel on Mount Ebal, 31just as Moses the Lord’s servant had commanded the Israelites. As described in the law scroll of Moses, it was made with uncut stones untouched by an iron tool. On it they offered burnt sacrifices to the Lord and sacrificed tokens of peace. 32There, in the presence of the Israelites, Joshua inscribed on the stones a duplicate of the law written by Moses. 33All the people, rulers, leaders, and judges were standing on either side of the ark, in front of the Levitical priests who carried the ark of the covenant of the Lord. Both resident foreigners and native Israelites were there. Half the people stood in front of Mount Gerizim and the other half in front of Mount Ebal, as Moses the Lord’s servant had previously instructed them to do for the formal blessing ceremony.34Then Joshua read aloud all the words of the law, including the blessings and the curses, just as they are written in the law scroll. 35Joshua read aloud every commandment Moses had given before the whole assembly of Israel, including the women, children, and resident foreigners who lived among them.