8 Adonai said to Y’hoshua, “Don’t be afraid or fall into despair! Take all the people who can fight with you, set out, and go up to ‘Ai; because now I have handed over to you the king of ‘Ai, his people, his city and his land. 2 Do to ‘Ai and its king as you did to Yericho and its king; but this time, take its spoil and cattle as booty for yourselves. Ambush the city from behind.”
3 So Y’hoshua set out for ‘Ai with all the people who could fight. Y’hoshua chose 30,000 men, the most courageous of his troops, and sent them out by night. 4 He instructed them, “You are to lie in wait to ambush the city from behind. Stay close to the city; and all of you, be ready. 5 I and all the troops with me will approach the city; and when they come out to attack us, as they did before, we will run away from them. 6 They will chase after us until we have drawn them away from the city; because they will say, ‘They’re running away from us, as they did before’; so we’ll run away from them. 7 Then you will jump up from your ambush position and take possession of the city, for Adonai your God will hand it over to you. 8 When you have captured the city, you are to set it on fire; do according to what Adonai has said. Those are your orders.”
9 Y’hoshua sent them out; and they went to the place for the ambush, staying between Beit-El and ‘Ai, to the west of ‘Ai; while Y’hoshua camped that night with the people. 10 Y’hoshua got up early in the morning, mustered his men and went up to ‘Ai ahead of the people, he and the leaders of Isra’el . 11 All the troops marching with him went up, advanced, arrived in front of the city and camped on the north side of ‘Ai, with a valley between him and ‘Ai. 12 Then he took about 5,000 men and set them in ambush between Beit-El and ‘Ai, to the west of ‘Ai. 13 Thus the people arrayed themselves, with all the army to the north of the city, and their rearguard lying in wait to the west of the city. Y’hoshua spent that night in the valley.
14 The king of ‘Ai saw this, so the men in the city hurried out early in the morning to battle against Isra’el, he and all his people, at a meeting-place facing the ‘Aravah. But he was unaware that behind the city an ambush had been laid against him. 15 Y’hoshua and all Isra’el made as if they had been defeated before them and ran off on the road to the desert. 16 All the people in ‘Ai were summoned together to pursue them, so they chased Y’hoshua and were drawn away from the city. 17 Not a man was left in ‘Ai or Beit-El who had not gone after Isra’el; pursuing Isra’el, they left the city wide open.
18 Then Adonai said to Y’hoshua, “Point the spear in your hand toward ‘Ai, because I will hand it over to you.” Y’hoshua pointed the spear in his hand toward the city. 19 The men in ambush jumped up quickly from their place; the moment he stretched out his hand, they ran, entered the city and captured it; and they hurried to set the city on fire. 20 When the men of ‘Ai looked behind them, they saw it — there was the smoke from the city, rising to the sky; and they had no power to flee this way or that — at which point the people who had run off toward the desert turned back on the pursuers. 21 When Y’hoshua and all Isra’el saw that the ambush had captured the city and that the smoke of the city was going up, they turned back and slaughtered the men of ‘Ai; 22 while the others came out of the city against them too; so that they were surrounded by Isra’el with some on this side and some on that side. They attacked them, allowing none to remain or escape. 23 But they took the king of ‘Ai alive and brought him to Y’hoshua.
24 When Isra’el had finished slaughtering all the inhabitants of ‘Ai in the countryside, in the desert where they had pursued them, and they had all fallen, consumed by the sword, then all Isra’el returned to ‘Ai and defeated it with the sword. 25 Twelve thousand men and women fell that day, everyone in ‘Ai. 26 For Y’hoshua did not withdraw his hand, which he had used to point the spear, until he had utterly destroyed all the inhabitants of ‘Ai. 27 Only the livestock and the spoil of that city did Isra’el take as booty for themselves, in keeping with the order Adonai had given Y’hoshua. 28 So Y’hoshua burned down ‘Ai and turned it into a tel forever, so that it remains a ruin to this day. 29 The king of ‘Ai he hanged on a tree until evening; at sundown Y’hoshua gave an order, so they took his carcass down from the tree, threw it at the entrance of the city gate and piled on it a big heap of stones, which is there to this day.
30 Then Y’hoshua built an altar to Adonai, the God of Isra’el, on Mount ‘Eival, 31 as Moshe the servant of Adonai had ordered the people of Isra’el to do (this is written in the book of the Torah of Moshe), an altar of uncut stones that no one had touched with an iron tool. On it they offered burnt offerings to Adonai and sacrificed peace offerings. 32 He wrote there on the stones a copy of the Torah of Moshe, inscribing it in the presence of the people of Isra’el. 33 Then all Isra’el, including their leaders, officials and judges, stood on either side of the ark in front of the cohanim, who were L’vi’im and who carried the ark for the covenant of Adonai. The foreigners were there along with the citizens. Half of the people were in front of Mount G’rizim and half of them in front of Mount ‘Eival, as Moshe the servant of Adonai had ordered them earlier in connection with blessing the people of Isra’el. 34 After this, he read all the words of the Torah, the blessing and the curse, according to everything written in the book of the Torah. 35 There was not a word of everything Moshe had ordered that Y’hoshua did not read before all Isra’el assembled, including the women, the little ones and the foreigners living with them.