Joshua 8:13-23

13 So they stationed the forces, the main encampment which was north of the city and its rear guard west of the city. But Joshua spent that night in the valley.
14 And when the king of Ai saw this he and all his people, the men of the city, made haste and went out early to the descent 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 made a pretense of being 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 There was not a man 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 ambush rose quickly out of their place, and as soon as he had stretched out his hand, they ran and entered the city and took it; and they made haste 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 that fled to the wilderness turned back upon the pursuers.
21 And when Joshua and all Israel saw that the ambush had taken the city, and that the smoke of the city went up, then they turned back and smote the men of Ai.
22 And the others came forth from the city against them; so they were in the midst of Israel, some on this side, and some on that side; and Israel smote them, until there was left none that survived or escaped.
23 But the king of Ai they took alive, and brought him to Joshua.
Revised Standard Version of the Bible, copyright 1952 [2nd edition, 1971] by the Division of Christian Education of the National Council of the Churches of Christ in the United States of America. Used by permission. All rights reserved.