Devarim (Deuteronomy): Vayelech > Ch 31
Moses is 120 years old. He assigns Joshua as the leader to cross Jordan.
And Moses went, and he spoke the following words to all Israel. He said to them, "Today I am one hundred and twenty years old. I can no longer go or come, and the Lord said to me, "You shall not cross this Jordan. The Lord, your G-d He will cross before you; He will destroy these nations from before you so that you will possess them. Joshua he will cross before you, as the Lord has spoken. And the Lord will do to them, as He did to the Amorite kings, Sihon and Og, and to their land, [all of] which He destroyed. And [when] the Lord delivers them before you, you shall do to them according to all the commandment that I have commanded you. Be strong and courageous! Neither fear, nor be dismayed of them, for the Lord, your G-d He is the One Who goes with you. He will neither fail you, nor forsake you." And Moses called Joshua and said to him in the presence of all Israel, "Be strong and courageous! For you shall come with this people to the land which the Lord swore to their forefathers to give them. And you shall apportion it to them as an inheritance. The Lord He is the One Who goes before you; He will be with you; He will neither fail you, nor forsake you. Do not fear, and do not be dismayed."
Moses writes the Torah, and commands priests to read it to the nation every 7 years on Succoth
Then Moses wrote this Torah, and gave it to the priests, the descendants of Levi, who carried the ark of the covenant of the Lord, and to all the elders of Israel.
Then, Moses commanded them, saying, "At the end of [every] seven years, at an appointed time, in the Festival of Succoth, [after] the year of release, When all Israel comes to appear before the Lord, your G-d, in the place He will choose you shall read this Torah before all Israel, in their ears. Assemble the people: the men, the women, and the children, and your stranger in your cities, in order that they hear, and in order that they learn and fear the Lord, your G-d, and they will observe to do all the words of this Torah. And their children, who did not know, will hear and learn to fear the Lord, your G-d, all the days that you live on the land, to which you are crossing the Jordan, to possess.
G-d appears in a pillar of cloud and says that the nation will violate the covenant and many evils and troubles will befall them.
And the Lord said to Moses, "Behold, your days are approaching [for you] to die. Call Joshua and stand in the Tent of Meeting, and I will inspire him. So Moses and Joshua went, and stood in the Tent of Meeting. And the Lord appeared in the Tent, in a pillar of cloud. The pillar of cloud stood at the entrance to the Tent. And the Lord said to Moses: Behold, you are [about to] lie with your forefathers, and this nation will rise up and stray after the deities of the nations of the land, into which they are coming. And they will forsake Me and violate My covenant which I made with them. And My fury will rage against them on that day, and I will abandon them and hide My face from them, and they will be consumed, and many evils and troubles will befall them, and they will say on that day, 'Is it not because our G-d is no longer among us, that these evils have befallen us?' And I will hide My face on that day, because of all the evil they have committed, when they turned to other deities.
G-d commands Moses to teach Israelites a song which bears witness against Israelites
And now, write for yourselves this song, and teach it to the Children of Israel. Place it into their mouths, in order that this song will be for Me as a witness for the children of Israel. When I bring them to the land which I have sworn to their forefathers [to give them], a land flowing with milk and honey, they will eat and be satisfied, and live on the fat [of the land]. Then, they will turn to other deities and serve them, provoking Me and violating My covenant. And it will be, when they will encounter many evils and troubles, this song will bear witness against them, for it will not be forgotten from the mouth of their offspring. For I know their inclination what they [are planning] to do today, [even] before I bring them in to the land which I have sworn [to give them]." And Moses wrote this song on that day, and taught it to the children of Israel. And He commanded Joshua the son of Nun, and said: "Be strong and courageous! For you shall bring the children of Israel to the land that I have sworn to them, and I will be with you."
Moses commands Levites to place the Torah along side the ark of the covenant.
And it was, when Moses finished writing the words of this Torah in a scroll, until their very completion, that Moses commanded the Levites, who carried the ark of the covenant of the Lord, saying: "Take this Torah scroll and place it along side the ark of covenant of the Lord, your G-d, and it will be there as a witness. For I know your rebellious spirit and your stubbornness. Even while I am alive with you today you are rebelling against the Lord, and surely after my death! Assemble to me all the elders of your tribes and your officers, and I will speak these words into their ears, and I will call upon the heaven and the earth as witnesses against them.
Evil will befall you at the end of days, because you did evil in the eyes of the Lord
For I know that after my death, you will surely become corrupted, and deviate from the way which I had commanded you. Consequently, the evil will befall you at the end of days, because you did evil in the eyes of the Lord, to provoke Him to anger through the work of your hands.
Then, Moses spoke into the ears of the entire assembly of Israel the words of the following song, until their completion.
Research & Analysis
Evil will befall you at the end of days
One of the most important prophecies - one that is yet to be fulfilled. It tells us that at the end of days, prior to everything becoming good in the world, Jews will face a great punishment. In the 20th century Jews have faced great troubles culminating in the Holocaust, and were then blessed with the creation of Israel. At the end of days a similar scenario might happen on an even greater scale. Israel will likely face a devastating attack by the entire world, but will ultimately be victorious.