23 But the king of Ai they took alive, and brought him near to Joshua.
24 When Israel had finished killing all the inhabitants of Ai in the open wilderness where they pursued them, and all of them to the very last had fallen by the edge of the sword, all Israel returned to Ai and struck it down with the edge of the sword. 25 And all who fell that day, both men and women, were 12,000, all the people of Ai. 26 But Joshua did not draw back his hand with which he stretched out the javelin until he had devoted all the inhabitants of Ai to destruction. 27 Only the livestock and the spoil of that city Israel took as their plunder, according to the word of the Lord that he commanded Joshua. 28 So Joshua burned Ai and made it forever a heap of ruins, as it is to this day. 29 And he hanged the king of Ai on a tree until evening. And at sunset Joshua commanded, and they took his body down from the tree and threw it at the entrance of the gate of the city and raised over it a great heap of stones, which stands there to this day. (Joshua 8:23–29)
So says the Lord our God:
22 “And if a man has committed a crime punishable by death and he is put to death, and you hang him on a tree, 23 his body shall not remain all night on the tree, but you shall bury him the same day, for a hanged man is cursed by God. You shall not defile your land that the Lord your God is giving you for an inheritance. (Deuteronomy 21:22–23 ESV)
Ai is taken by a feint, a rouse, a deception — one of many in Israelite warfare that will give the battlefield to Israel. And the city, and all that are in it — 12,000 human souls — are killed.
All but the king. Who is taken, likely abused and tortured, and “hanged on a tree.” (“Impaled on a stick” according to the JPS Tanakh, also translated that way in Deuteronomy 21) The word here, in the Septuagint (the Greek translation of the Hebrew Bible) is “ξύλο,” or wood. Peter will use similar language his defense of the faith in Acts when he preaches in the temple:
“We must obey God rather than men. The God of our fathers raised Jesus, whom you killed by hanging him on a tree.” [ὃν ὑμεῖς διεχειρίσασθε κρεμάσαντες ἐπὶ ξύλου, literally “by your hands hung on a pole.”] (Acts 5:29–30)
This is used twice more in Acts. Here…
And we are witnesses of all that he did both in the country of the Jews and in Jerusalem. They put him to death by hanging him on a tree [κρεμάσαντες ἐπὶ ξύλου]… (Acts 10:39)
And when they had carried out all that was written of him, they took him down from the tree [καθελόντες ἀπὸ τοῦ ξύλου] and laid him in a tomb. (Acts 13:29)
This punishment — and we will see more of it in a few days — is reserved here for the king of an enemy city. What crime this unnamed king of Ai (מֶלֶךְ הָעַי) has committed we do not know, save for maybe being the king of an enemy city.
So far as I can tell in scripture, this punishment — hanging on a tree, impaling on a stick — is reserved solely for enemy kings. For those Israel, and its commander Joshua — יְהוֹשֻׁעַ, Ἰησοῦς, “the one who saves” — conquered, defeated, and captured in battle. It is the ultimate humiliation, this public death, this hanging, this impaling, this nailing, the ultimate expression of power and contempt, reserved for the leader of a city given into the hands of rapacious, conquering Israel.
For an enemy — our enemy — given into our hands, one God has delivered up and devoted to destruction.