“Joshua did not draw back his hand, with which he stretched out the sword, until he had utterly destroyed all the inhabitants of Ai. Only the livestock and the spoil of that city Israel took as their booty, according to the word of Yahweh that he issued to Joshua. So Joshua burned Ai. He made it forever a heap of ruins, as it is to this day. He hanged the king of Ai on a tree until evening. At sunset, Joshua commanded that they tale his body down from the tree. They threw it down at the entrance of the gate of the city. They raised over it a great heap of stones, which stands there to this day.”
Joshua held his arm stretched out until all the inhabitants of Ai were destroyed. They took the livestock and booty. The King of Ai was hung and his body thrown at the gate of the city. The hanging of defeated kings was common in the 8the century BCE in the Middle East. The destruction of Ai was now complete as it stands in ruin with stones heaped all around it. The idea of destruction of annihilation was based on the Hebrew word herem, which first appeared in Numbers, chapter 21 and explained in Deuteronomy, chapter 20. Both Jericho and Ai suffered this herem, of total destruction. Of course, this concept borders on genocide. The attempt to justify total destruction always comes up a little short. Obviously, it was a common theme among ancient people to totally destroy their enemy. All traces of the evil enemy had to be eliminated.