Joshua.
Chapter 23.
A long time later, after the Lord had given peace to the Israelites from conflict with their enemies around them, Joshua, by now really old, 
summoned all the Israelites—the elders, leaders, judges, and officials—and told them, “I'm old, getting on in years. 
You've seen everything the Lord your God has done to all the nations on your behalf—the Lord your God has been fighting for you. 
I have allotted the land of the remaining nations for you to own, as well as the nations already conquered, from the Jordan to the Mediterranean Sea. 
The Lord your God will make them retreat from you. He will drive them out before you and you will take possession of their land, as the Lord your God promised you. 
Be sure to observe everything that is written in the book of the Law of Moses. Don't stray from it, either to the left or to the right. 
Don't associate with the nations that are left. Don't mention the names of their gods, and don't swear by them, worship them, or bow down to them. 
Stay close to the Lord your God, as you have done up to now. 
The Lord has driven out strong, powerful nations before you. No one has been able to stand up to you to this day. 
Just one of you can chase away a thousand enemies, for the Lord your God is fighting for you, as he promised you. 
Take great care to love the Lord your God. 
For if you do turn from him, and adopt the ways of the nations that are left, if you intermarry with them, associating with one other, 
you can be absolutely sure that the Lord your God will definitely not drive out these nations before you. On the contrary, they will be a trap and a snare to you, a whip on you back and thorns in your eyes until you die out completely from this good land the Lord your God has given you. 
Now I am about to die, the fate of every living thing on the earth. Deep down you know that not a single one of the Lord's good promises has failed. Everything has come true. Not one has failed. 
But in the same way that you received all the good things that the Lord you God promised, the Lord will bring on you all the bad things he has threatened until you're completely wiped out from this good land the Lord your God has given you. 
If you break the agreement the Lord your God made with you, and you go and worship other gods, bowing down before them, then the Lord will become angry with you, and you will be quickly wiped out from the good land he has given you.” 
