23 A long time afterward, when the Lord had given rest to Israel from all their surrounding enemies, and Joshua was old and well advanced in years, 2 Joshua summoned all Israel, its elders and heads, its judges and officers, and said to them, “I am now old and well advanced in years. 3 And you have seen all that the Lord your God has done to all these nations for your sake, for it is the Lord your God who has fought for you. 4 Behold, I have allotted to you as an inheritance for your tribes those nations that remain, along with all the nations that I have already cut off, from the Jordan to the Great Sea in the west. 5 The Lord your God will push them back before you and drive them out of your sight. And you shall possess their land, just as the Lord your God promised you. 6 Therefore, be very strong to keep and to do all that is written in the Book of the Law of Moses, turning aside from it neither to the right hand nor to the left, 7 that you may not mix with these nations remaining among you or make mention of the names of their gods or swear by them or serve them or bow down to them, 8 but you shall cling to the Lord your God just as you have done to this day. 9 For the Lord has driven out before you great and strong nations. And as for you, no man has been able to stand before you to this day. 10 One man of you puts to flight a thousand, since it is the Lord your God who fights for you, just as he promised you. 11 Be very careful, therefore, to love the Lord your God. 12 For if you turn back and cling to the remnant of these nations remaining among you and make marriages with them, so that you associate with them and they with you, 13 know for certain that the Lord your God will no longer drive out these nations before you, but they shall be a snare and a trap for you, a whip on your sides and thorns in your eyes, until you perish from off this good ground that the Lord your God has given you.
14 “And now I am about to go the way of all the earth, and you know in your hearts and souls, all of you, that not one word has failed of all the good things[a] that the Lord your God promised concerning you. All have come to pass for you; not one of them has failed. 15 But just as all the good things that the Lord your God promised concerning you have been fulfilled for you, so the Lord will bring upon you all the evil things, until he has destroyed you from off this good land that the Lord your God has given you, 16 if you transgress the covenant of the Lord your God, which he commanded you, and go and serve other gods and bow down to them. Then the anger of the Lord will be kindled against you, and you shall perish quickly from off the good land that he has given to you.”— Joshua 23:1-16, English Standard Version