Joshua 8:21-31

21 and Joshua and all Israel have seen that the ambush hath captured the city, and that the smoke of the city hath gone up, and they turn back and smite the men of Ai;
22 and these have come out from the city to meet them, and they are in the midst of Israel, some on this side, and some on that, and they smite them till he hath not left to them a remnant and escaped one;
23 and the king of Ai they caught alive, and bring him near unto Joshua.
24 And it cometh to pass, at Israel's finishing to slay all the inhabitants of Ai in the field, in the wilderness in which they pursued them (and they fall all of them by the mouth of the sword till their consumption), that all Israel turn back to Ai, and smite it by the mouth of the sword;
25 and all who fall during the day, of men and of women, are twelve thousand -- all men of Ai.
26 And Joshua hath not brought back his hand which he stretched out with the javelin till that he hath devoted all the inhabitants of Ai;
27 only, the cattle and the spoil of that city have Israel spoiled for themselves, according to the word of Jehovah which He commanded Joshua.
28 And Joshua burneth Ai, and maketh it a heap age-during -- a desolation unto this day;
29 and the king of Ai he hath hanged on the tree till even-time, and at the going in of the sun hath Joshua commanded, and they take down his carcase from the tree, and cast it unto the opening of the gate of the city, and raise over it a great heap of stones till this day.
30 Then doth Joshua build an altar to Jehovah, God of Israel, in mount Ebal,
31 as Moses, servant of Jehovah, commanded the sons of Israel, as it is written in the book of the law of Moses -- an altar of whole stones, over which he hath not waved iron -- and they cause to go up upon it burnt-offerings to Jehovah, and sacrifice peace-offerings;

Joshua 8:21-31 Meaning and Commentary

INTRODUCTION TO JOSHUA 8

Joshua is encouraged to go up and take Ai, and is directed what method to make use of, Jos 8:1,2; accordingly he set an ambush on the west side of it, and, he and the rest of the army went up before it, Jos 8:3-13; which, when the king of Ai saw, he and all his forces came cut against them, and the Israelites making a feint as if they were beaten, drew on the men of Ai to pursue them, upon which the ambush arose and entered the city and set fire to it, Jos 8:14-19; the smoke of which being observed by Joshua and Israel, they turned back upon the pursuers, and the ambush sallying out of the city behind them, made an entire destruction of them, then slew all the inhabitants, took the spoil, burnt the city, and hanged the king of it, Jos 8:20-29; after this Joshua built an altar at Ebal, wrote the law on stones, and read the blessings and curses in it before all Israel, Jos 8:30-35.

Young's Literal Translation is in the public domain.