Deuteronomy 21:23 in the King James Version
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 accursed of God;) that thy land be not defiled, which the LORD thy God giveth thee for an inheritance.
Context
22 If a man has committed a sin worthy of 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 surely bury him the same day; for he who is hanged is accursed of God. Don’t defile your land which the LORD your God gives you for an inheritance.