Deuteronomy 31:21-23 New American Standard Bible (NASB)

21. Then it shall come about, when many evils and troubles have come upon them, that this song will testify before them as a witness (for it shall not be forgotten from the lips of their descendants); for I know their intent which they are developing today, before I have brought them into the land which I swore."

22. So Moses wrote this song the same day, and taught it to the sons of Israel.

23. Then He commissioned Joshua the son of Nun, and said, "Be strong and courageous, for you shall bring the sons of Israel into the land which I swore to them, and I will be with you."

Deuteronomy 31