Now it came about after many days, when the LORD had given rest to Israel from all their enemies on every side, and Joshua was old, advanced in years, that Joshua called for all Israel, for their elders and their heads and their judges and their officers, and said to them, “I am old, advanced in years. And you have seen all that the LORD your God has done to all these nations because of you, for the LORD your God is He who has been fighting for you. See, I have apportioned to you these nations which remain as an inheritance for your tribes, with all the nations which I have cut off, from the Jordan even to the Great Sea toward the setting of the sun. The LORD your God, He will thrust them out from before you and drive them from before you; and you will possess their land, just as the LORD your God promised you. Be very firm, then, to keep and do all that is written in the book of the law of Moses, so that you may not turn aside from it to the right hand or to the left, so that you will not associate with these nations, these which remain among you, or mention the name of their gods, or make anyone swear by them, or serve them, or bow down to them. But you are to cling to the LORD your God, as you have done to this day. For the LORD has driven out great and strong nations from before you; and as for you, no man has stood before you to this day. One of your men puts to flight a thousand, for the LORD your God is He who fights for you, just as He promised you. So take diligent heed to yourselves to love the LORD your God. For if you ever go back and cling to the rest of these nations, these which remain among you, and intermarry with them, so that you associate with them and they with you, know with certainty that the LORD your God will not continue to drive these nations out from before you; but they will be a snare and a trap to you, and a whip on your sides and thorns in your eyes, until you perish from off this good land which the LORD your God has given you.