Joshua 8:18-28

18 Then the Lord said to Joshua, "Stretch out the sword that is in your hand toward Ai; for I will give it into your hand." And Joshua stretched out the sword that was in his hand toward the city.
19 As soon as he stretched out his hand, the troops in ambush rose quickly out of their place and rushed forward. They entered the city, took it, and at once set the city on fire.
20 So when the men of Ai looked back, the smoke of the city was rising to the sky. They had no power to flee this way or that, for the people who fled to the wilderness turned back against the pursuers.
21 When Joshua and all Israel saw that the ambush had taken the city and that the smoke of the city was rising, then they turned back and struck down the men of Ai.
22 And the others came out from the city against them; so they were surrounded by Israelites, some on one side, and some on the other; and Israel struck them down until no one was left who survived or escaped.
23 But the king of Ai was taken alive and brought to Joshua.
24 When Israel had finished slaughtering all the inhabitants of Ai in the open wilderness where they pursued them, and when all of them to the very last had fallen by the edge of the sword, all Israel returned to Ai, and attacked it with the edge of the sword.
25 The total of those who fell that day, both men and women, was twelve thousand—all the people of Ai.
26 For Joshua did not draw back his hand, with which he stretched out the sword, until he had utterly destroyed all the inhabitants of Ai.
27 Only the livestock and the spoil of that city Israel took as their booty, according to the word of the Lord that he had issued to Joshua.
28 So Joshua burned Ai, and made it forever a heap of ruins, as it is to this day.
New Revised Standard Version Bible, copyright 1989, 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.