Deuteronomy 21:23
23 His body shall not remain all night upon the tree, but thou shalt in any wise bury him that day; (for he that is hanged is accursedc of God;) that thy land be not defiled, which the LORD thy God giveth thee for an inheritance.
Deu. 21:23. "For he that is hanged is accursed by God." The instances we have of those that were hanged, are agreeable to this. Thus the heads of the people that joined themselves to Baalpeor were hung up before the sun, that the fierce anger of God might cease. Numbers 25:3; Numbers 25:4. So the seven sons of Saul were hanged, to remove God's wrath from the land. Ahithophel, who was cursed by David in God's name, hanged himself. Absalom was hanged in an oak for his rebellion against his father: "For it is written, Cursed is every one that setteth light by father or by mother." The kings of the cursed cities of Canaan were hanged. Haman was hanged, for he was a type of antichrist. Judas hanged himself, having been declared accursed by Christ before.
Deu. 21:23. The manner of the Israelites in pursuance of this institution used to be to let them hang till the sun was down, and then to take the bodies down and bury them, as is evident by Joshua 8:29; Joshua 10:26; Joshua 10:27. God did not see meet that that which was a curse and execration should remain in open sight for an abomination to the pure eyes of the God that dwelt in that holy land. They were therefore to remove such abominable things out of God's sight, that God might dwell and walk in the land, and not withdraw from it, (see Deuteronomy 23:13; Deuteronomy 23:14). But it is very probable that one reason why those that were hanged and accursed were to be taken down and buried as soon as the sun was down, was that the sun was a type of Christ, and in setting was a type of that death of Christ, (Luke 23:44). The curse was to be removed and buried as soon as the sun was set, to signify that the curse is removed by the death of Christ; for He in dying was made a curse for us, and that curse by His death is taken from the earth, or at least from the land of Israel, or the land of the Church, so that that land is not defiled. God's people have not the curse remaining amongst them to render them abominable to God, and to cause Him to depart from them. Their sins and abominations are buried for ever out of His sight by Christ's death. Indeed it was so ordered that the body of Christ, though it was hanged on a tree, was taken down and buried before sunsetting; the Jews took it down before, that it might not remain in the open air on the sabbath-day (John 19:31). This seems to be so ordered, because Christ, though made a curse, was not such a curse as was removed by what was typified by the setting of the sun, but He was the antitype itself.