Joshua - Chapter 8
Like Chapter 7 this chapter is about the fight against the city of Ai. But unike Chapter 7, this time the people are following God's directions and are victorious. And so we read at the end of the battle:
"So Joshua burned Ai and made it a heap forever, a desolation to this day. And the king of Ai he hanged on a tree until evening. And as soon as the sun was down, Joshua commanded that they should take his corpse down from the tree, cast it at the entrance of the gate of the city, and raise over it a great heap of stones that remains to this day."
The King was hanged on a tree and then taken down at sunset. This is following the words in Deuteronomy 21:
"If a man has committed a sin deserving of death, and he is put to death, and you hang him on a tree, his body shall not remain overnight on the tree, but you shall surely bury him that day, so that you do not defile the land which the Lord your God is giving you as an inheritance; for he who is hanged is accursed of God."
And Galatians 3 shows that this is linked to Jesus:
"Christ has redeemed us from the curse of the law, having become a curse for us (for it is written, “Cursed is everyone who hangs on a tree”), that the blessing of Abraham might come upon the Gentiles in Christ Jesus, that we might receive the promise of the Spirit through faith."