Deuteronomy 31:1-21 NIV
Then Moses went out and spoke these words to all Israel: “I am now a hundred and twenty years old and I am no longer able to lead you. The LORD has said to me, ‘You shall not cross the Jordan.’ The LORD your God himself will cross over ahead of you. He will destroy these nations before you, and you will take possession of their land. Joshua also will cross over ahead of you, as the LORD said. And the LORD will do to them what he did to Sihon and Og, the kings of the Amorites, whom he destroyed along with their land. The LORD will deliver them to you, and you must do to them all that I have commanded you. Be strong and courageous. Do not be afraid or terrified because of them, for the LORD your God goes with you; he will never leave you nor forsake you.”
Then Moses summoned Joshua and said to him in the presence of all Israel, “Be strong and courageous, for you must go with this people into the land that the LORD swore to their ancestors to give them, and you must divide it among them as their inheritance. The LORD himself goes before you and will be with you; he will never leave you nor forsake you. Do not be afraid; do not be discouraged.”
So Moses wrote down this law and gave it to the Levitical priests, who carried the ark of the covenant of the LORD, and to all the elders of Israel. Then Moses commanded them: “At the end of every seven years, in the year for canceling debts, during the Festival of Tabernacles, when all Israel comes to appear before the LORD your God at the place he will choose, you shall read this law before them in their hearing. Assemble the people—men, women and children, and the foreigners residing in your towns—so they can listen and learn to fear the LORD your God and follow carefully all the words of this law. Their children, who do not know this law, must hear it and learn to fear the LORD your God as long as you live in the land you are crossing the Jordan to possess.”
The LORD said to Moses, “Now the day of your death is near. Call Joshua and present yourselves at the tent of meeting, where I will commission him.” So Moses and Joshua came and presented themselves at the tent of meeting.
Then the LORD appeared at the tent in a pillar of cloud, and the cloud stood over the entrance to the tent. 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. 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?’ And I will certainly hide my face in that day because of all their wickedness in turning to other gods.
“Now write down this song and teach it to the Israelites and have them sing it, so that it may be a witness for me against them. When I have brought them into the land flowing with milk and honey, the land I promised on oath to their ancestors, and when they eat their fill and thrive, they will turn to other gods and worship them, rejecting me and breaking my covenant. And when many disasters and calamities come on them, this song will testify against them, because it will not be forgotten by their descendants. I know what they are disposed to do, even before I bring them into the land I promised them on oath.”
NIV: New International Version