In context
23But they took the king of Ai alive and brought him to Joshua. 24When Israel had finished killing all the inhabitants of Ai in the open country and in the wilderness where they had chased them, and all of them had fallen by the sword until they were wiped out, all Israel returned to Ai and struck it down with the sword. 25The total who fell that day, men and women together, was twelve thousand — all the people of Ai. 26Joshua did not draw back the hand with which he had stretched out the javelin until he had devoted all the inhabitants of Ai to destruction. 27Only the livestock and the plunder of that city did Israel take for themselves, according to the word Yahweh had commanded Joshua.
