Deuteronomy 21:23

23 his corpse must not remain all night upon the tree; you shall bury him that same day, for anyone hung on a tree is under God's curse. You must not defile the land that the Lord your God is giving you for possession.

Deuteronomy 21:23 In-Context

21 Then all the men of the town shall stone him to death. So you shall purge the evil from your midst; and all Israel will hear, and be afraid.
22 When someone is convicted of a crime punishable by death and is executed, and you hang him on a tree,
23 his corpse must not remain all night upon the tree; you shall bury him that same day, for anyone hung on a tree is under God's curse. You must not defile the land that the Lord your God is giving you for possession.
New Revised Standard Version Bible, copyright 1989, Division of Christian Education of the National Council of the Churches of Christ in the United States of America. Used by permission. All rights reserved.