Deuteronomy 21:23 CSB

23 you are not to leave his corpse on the tree overnight but are to bury him that day, for anyone hung [on a tree] is under God's curse.a You must not defile the land the Lord your God is giving you as an inheritance.

References for Deuteronomy 21:23