Deuteronomy 21:22-23 Amplified Bible (AMP)

22. And if a man has committed a sin worthy of death and he is put to death and [afterward] you hang him on a tree, [Josh. 10:26, 27.]

23. His body shall not remain all night upon the tree, but you shall surely bury him on the same day, for a hanged man is accursed by God. Thus you shall not defile your land which the Lord your God gives you for an inheritance. [Gal. 3:13.]

Deuteronomy 21