Exodus 34:12
10 He said, “See, I am going to make a covenant before all your people. I will do wonders such as have not been done in all the earth, nor in any nation. All the people among whom you live will see the work of the Lord, for it is a fearful thing that I am doing with you. 11 “Obey what I am commanding you this day. I am going to drive out before you the Amorite, the Canaanite, the Hittite, the Perizzite, the Hivite, and the Jebusite. 12 Be careful not to make a covenant with the inhabitants of the land where you are going, lest it become a snare among you. 13 Rather you must destroy their altars, smash their images, and cut down their Asherah poles. 14 For you must not worship any other god, for the Lord, whose name is Jealous, is a jealous God.
Joshua 23:13
11 Watch yourselves carefully! Love the Lord your God! 12 But if you ever turn away and make alliances with these nations that remain near you, and intermarry with them and establish friendly relations with them, 13 know for certain that the Lord your God will no longer drive out these nations from before you. They will trap and ensnare you; they will be a whip that tears your sides and thorns that blind your eyes until you disappear from this good land the Lord your God gave you. 14 “Look, today I am about to die. You know with all your heart and being that not even one of all the faithful promises the Lord your God made to you is left unfulfilled; every one was realized—not one promise is unfulfilled! 15 But in the same way that every faithful promise the Lord your God made to you has been realized, it is just as certain that if you disobey, then the Lord will bring on you every judgment until he destroys you from this good land that the Lord your God gave you.
Notes and References
"... Whereas verse 2 introduces a divine quote in the messenger’s speech, verse 3 adds יתרמא םגו, which is indeed striking. However, the content of verse 3 alludes to שׁקומ in Exodus 23:33 and the forbidden covenantal relations in Exodus 34:12; Deuteronomy 7:16 and finally Joshua 23:13. Without verse 3, the people’s reaction in verse 4 cannot be understood. The topic of the nations that were not expelled fits very well with the context. This is quite compelling within the text’s broader line of argumentation, even if verse 2 refers to Joshua 9, as Blum has convincingly argued. Thus, the second quotation may indeed be read as performative speech, which is perhaps the reason for the emphatic םגו (which is thus not an indication of a secondary insertion!) If anything, it is the angel’s first statement that may be suspicious. The idea that the covenant will never be broken by God goes far beyond the topic of forbidden mixing in verses 2–3 and the connection to Joshua 9. In light of such a promise by God, there is no need for crying (verses 4-5) ..."
Frevel, Christian "On Untying Tangles and Tying Knots in Joshua 23–Judges 3:6: A Response to Erhard Blum, Reinhard G. Kratz and Sarah Schulz" in Berner, Christoph, et al. (eds.) Book-Seams in the Hexateuch I: The Literary Transition between the Books of Genesis/Exodus and Joshua/Judges (pp. 281-294) Mohr Siebeck, 2018