He hung the king of Ai on a tree until evening, and at sunset Joshua commanded that they take down the body from the tree and throw it down at the entrance of the city gate. And over it they raised a large pile of rocks, which remains to this day.
If a man has committed a sin worthy of death, and he is executed, and you hang his body on a tree, you must not leave the body on the tree overnight, but you must be sure to bury him that day, because anyone who is hung on a tree is under God’s curse. You must not defile the land that the LORD your God is giving you as an inheritance.
Significance
Deuteronomy 21:22-23 legislates that a body hung on a tree (תָּלוּי, tālûy) "must not be left on the tree overnight, but you must be sure to bury him that day, because anyone who is hung on a tree is under God's curse," lest the body defile the land Yahweh gives as inheritance. Joshua 8:29 is the canon's first enactment of that statute: the king of Ai is hung on a tree "until evening, and at sunset Joshua commanded that they take down the body from the tree" and bury it — the precise sundown-burial protocol Moses commanded. The connection is legal-narrative compliance, not citation: Joshua does not quote the law but performs it, demonstrating the regulation operative within Israel's historical memory (hence Allusion, not Direct Quotation). The warranted method is Redemptive-Historical Progression — the conquest narrative shows the Mosaic ban-and-burial code being executed as Israel takes the land; this is not typology, because the cursed Canaanite king is no Christ-figure but a defeated enemy, and the curse-formula's theology lies dormant here, released only when Paul (Galatians 3:13) reads the statute itself as Christ "becoming a curse for us" by hanging on the tree. Yet that very dormancy is the point: Joshua's obedient compliance keeps the statute alive and visible across the centuries, so that when Christ is "hung on a tree" the divinely-established category is waiting for him. The road to Christ runs not through the Ai king but through the law Joshua honored — the same word "cursed... on a tree" that condemned an enemy becomes the word that, borne by the Son, redeems his enemies. And here the curse turns sweet: the One we would have hung on the gibbet hangs there in our place, taken down before sundown not to spare the land defilement but to be laid in a borrowed tomb and rise — so that the curse we dreaded becomes the very ground of our welcome, and Christ the curse-bearer is seen as more desirable than the innocence we lost.
Found via
Anchor-Text Network (Deuteronomy 21:23 — Cursed Is He Who Hangs on a Tree)