Deuteronomy 21 23
his body is not to be left overnight on the tree, but you shall certainly bury him on the same day (for he who is hanged is cursed of God), so that you do not defile your land which the Lord your God is giving you as an inheritance.