Deuteronomy 31:14-31:19
And HaShem said unto Moses: "Behold, thy days approach that thou must die; call Joshua, and present yourselves in the tent of meeting, that I may give him a charge." And Moses and Joshua went, and presented themselves in the tent of meeting. And HaShem appeared in the Tent in a pillar of cloud; and the pillar of cloud stood over the door of the Tent.
And HaShem said unto Moses: "Behold, thou art about to sleep with thy fathers; and this people will rise up, and go astray after the foreign gods of the land, whither they go to be among them, and will forsake Me, and break My covenant which I have made with them.
"Then My anger shall be kindled against them in that day, and I will forsake them, and I will hide My face from them, and they shall be devoured, and many evils and troubles shall come upon them; so that they will say in that day: Are not these evils come upon us because our G-d is not among us?
"And I will surely hide My face in that day for all the evil which they shall have wrought, in that they are turned unto other gods.
"Now therefore write ye this song for you, and teach thou it the children of Israel; put it in their mouths, that this song may be a witness for Me against the children of Israel."