Deuteronomy 21:23

MKJV(i) 23 his body shall not remain all night on the tree. But you shall surely bury him that day (for he that is hanged is accursed of God), so that your land may not be defiled, which Jehovah your God gives you for an inheritance.