Moses continued speaking to the people of Israel,
and said, "I am now a hundred and twenty years old and am no longer able to be your leader. And besides this, the Lord has told me that I will not cross the Jordan.
The Lord your God himself will go before you and destroy the nations living there, so that you can occupy their land; and Joshua will be your leader, as the Lord has said.
The Lord will destroy those people, just as he defeated Sihon and Og, kings of the Amorites, and destroyed their country.
The Lord will give you victory over them, and you are to treat them exactly as I have told you.
Be determined and confident. Do not be afraid of them. Your God, the Lord himself, will be with you. He will not fail you or abandon you."
Then Moses called Joshua and said to him in the presence of all the people of Israel, "Be determined and confident; you are the one who will lead these people to occupy the land that the Lord promised to their ancestors.
The Lord himself will lead you and be with you. He will not fail you or abandon you, so do not lose courage or be afraid."
So Moses wrote down God's Law and gave it to the levitical priests, who were in charge of the Lord's Covenant Box, and to the leaders of Israel.
He commanded them, "At the end of every seven years, when the year that debts are canceled comes around, read this aloud at the Festival of Shelters.
Read it to the people of Israel when they come to worship the Lord your God at the one place of worship.
Call together all the men, women, and children, and the foreigners who live in your towns, so that everyone may hear it and learn to honor the Lord your God and to obey his teachings faithfully.
In this way your descendants who have never heard the Law of the Lord your God will hear it. And so they will learn to obey him as long as they live in the land that you are about to occupy across the Jordan."
Then the Lord said to Moses, "You do not have much longer to live. Call Joshua and bring him to the Tent, so that I may give him his instructions." Moses and Joshua went to the Tent,
and the Lord appeared to them there in a pillar of cloud that stood by the door of the Tent.
The Lord said to Moses, "You will soon die, and after your death the people will become unfaithful to me and break the covenant that I made with them. They will abandon me and worship the pagan gods of the land they are about to enter.
When that happens, I will become angry with them; I will abandon them, and they will be destroyed. Many terrible disasters will come upon them, and then they will realize that these things are happening to them because I, their God, am no longer with them.
And I will refuse to help them then, because they have done evil and worshiped other gods.
"Now, write down this song. Teach it to the people of Israel, so that it will stand as evidence against them.
I will take them into this rich and fertile land, as I promised their ancestors. There they will have all the food they want, and they will live comfortably. But they will turn away and worship other gods. They will reject me and break my covenant,
and many terrible disasters will come on them. But this song will still be sung, and it will stand as evidence against them. Even now, before I take them into the land that I promised to give them, I know what they are thinking."
That same day Moses wrote down the song and taught it to the people of Israel.
Then the Lord spoke to Joshua son of Nun and told him, "Be confident and determined. You will lead the people of Israel into the land that I promised them, and I will be with you."
Moses wrote God's Law in a book, taking care not to leave out anything.
When he finished, he said to the levitical priests, who were in charge of the Lord's Covenant Box,
"Take this book of God's Law and place it beside the Covenant Box of the Lord your God, so that it will remain there as a witness against his people.
I know how stubborn and rebellious they are. They have rebelled against the Lord during my lifetime, and they will rebel even more after I am dead.
Assemble all your tribal leaders and officials before me, so that I can tell them these things; I will call heaven and earth to be my witnesses against them.
I know that after my death the people will become wicked and reject what I have taught them. And in time to come they will meet with disaster, because they will have made the Lord angry by doing what he has forbidden."
Then Moses recited the entire song while all the people of Israel listened.