On this, the last day of his life, Moshe goes from tent to tent throughout the camp, bidding farewell to his beloved people, encouraging them to keep the faith. Moshe tells them that whether he is among them or not, G-d is with them, and will vanquish their enemies. Then he summons Yehoshua, and in front of all the people, exhorts him to be strong and courageous as the leader of the Jewish People. In this manner, he strengthens Yehoshua's status as the new leader. Moshe teaches them the mitzvah of Hakhel: That every seven years on the first day of the intermediate days of Succot, the entire nation, including small children, is to gather together at the Temple to hear the King read from the Book of Devarim. The sections that he reads deal with faithfulness to G-d, the covenant, and reward and punishment.
G-d tells Moshe that his end is near, and he should therefore summon Yehoshua to stand with him in the Mishkan, where G-d will teach Yehoshua. G-d then tells Moshe and Yehoshua that after entering the Land, the people will be unfaithful to Him, and begin to worship other gods. G-d will then completely hide his face, so that it will seem that the Jewish People are at the mercy of fate, and that they will be hunted by all. G-d instructs Moshe and Yehoshua to write down a song — Ha'azinu — which will serve as a witness against the Jewish People when they sin. Moshe records the song in writing and teaches it to Bnei Yisrael.
Moshe completes his transcription of the Torah, and instructs the Levi'im to place it to the side of the Aron (Holy Ark), so that no one will ever write a new Torah scroll that is different from the original — for there will always be a reference copy.