23 Long after this, when the Lord had given success to the people of Israel against their enemies and when Joshua was very old, 2 he called for the leaders of Israel—the elders, judges, and officers—and said to them, “I am an old man now, 3 and you have seen all that the Lord your God has done for you during my lifetime. He has fought for you against your enemies and has given you their land. 4-5 And I have divided to you the land of the nations yet unconquered as well as the land of those you have already destroyed. All the land from the Jordan River to the Mediterranean Sea shall be yours, for the Lord your God will drive out all the people living there now, and you will live there instead, just as he has promised you.
6 “But be very sure to follow all the instructions written in the book of the laws of Moses; do not deviate from them the least little bit. 7 Be sure that you do not mix with the heathen people still remaining in the land; do not even mention the names of their gods, much less swear by them or worship them. 8 But follow the Lord your God just as you have until now. 9 He has driven out great, strong nations from before you, and no one has been able to defeat you. 10 Each one of you has put to flight a thousand of the enemy, for the Lord your God fights for you, just as he has promised. 11 So be very careful to keep on loving him.
12 “If you don’t, and if you begin to intermarry with the nations around you, 13 then know for a certainty that the Lord your God will no longer chase those nations from your land. Instead, they will be a snare and a trap to you, a pain in your side and a thorn in your eyes, and you will disappear from this good land which the Lord your God has given you.
14 “Soon I will be going the way of all the earth—I am going to die.
“You know very well that God’s promises to you have all come true. 15-16 But as certainly as the Lord has given you the good things he promised, just as certainly he will bring evil upon you if you disobey him. For if you worship other gods, he will completely wipe you out from this good land that the Lord has given you. His anger will rise hot against you, and you will quickly perish.”