Deuteronomy 31:16-18 NIV

16 And the LORD said to Moses: “You are going to rest with your ancestors, and these people will soon prostitute themselves to the foreign gods of the land they are entering. They will forsake me and break the covenant I made with them.

References for Deuteronomy 31:16

17 And in that day I will become angry with them and forsake them; I will hide my face from them, and they will be destroyed. Many disasters and calamities will come on them, and in that day they will ask, ‘Have not these disasters come on us because our God is not with us?’
18 And I will certainly hide my face in that day because of all their wickedness in turning to other gods.