Then the LORD said to Moses: "It's almost time for you to die. Summon Joshua. The two of you must present yourselves at the meeting tent so I can command him." So Moses and Joshua went and presented themselves at the meeting tent.
The LORD appeared in the tent in a pillar of cloud; the cloud pillar stood at the tent's entrance.
The LORD then said to Moses: "Soon you will rest with your ancestors, and the people will rise up and act unfaithfully, going after strange gods of the land they are entering. They will abandon me, breaking my covenant that I made with them.
At that point my anger will burn against them, and I'll be the one who abandons them! I'll hide my face from them. They will become nothing but food for their enemies,a and all sorts of bad things and misfortunes will happen to them. Then they will say: ‘Haven't these terrible things happened to us because our God is no longer with us?'
But I will hide my face at that time because of the many wrong things they have done, because they have turned to other gods!
So in light of all that, you must write down this poem and teach it to the Israelites. Put it in their mouths so that the poem becomes a witness for me against them.
When I bring the Israelites to the land I swore to their ancestors, which is full of milk and honey, and they eat, get full, then fat, and then turn toward other gods, serving them and disrespecting me and breaking my covenant,
then, when all kinds of bad things and misfortunes happen to them, this poem will witness against them, giving its testimony, because it won't be lost from the mouths of their descendants. Yes, I know right now what they are inclined to do, even before I've brought them into the land I swore."
So Moses wrote this poem down that very day, and he taught it to the Israelites.
Then the Lord commissioned Joshua, Nun's son: "Be strong and fearless because you are the one who will bring the Israelites to the land I swore to them. I myself will be with you."