Joshua 8:21-31

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.
Complete Jewish Bible Copyright 1998 by David H. Stern. Published by Jewish New Testament Publications, Inc. All rights reserved. Used by permission.