Deuteronomy 31:18
16 Then the Lord said to Moses, “You are about to die, and then these people will begin to prostitute themselves with the foreign gods of the land into which they are going. They will reject me and break my covenant that I have made with them. 17 At that time my anger will erupt against them, and I will abandon them and hide my face from them until they are devoured. Many disasters and distresses will overcome them so that they will say at that time, ‘Have not these disasters overcome us because our God is not among us?’ 18 But I will certainly hide myself at that time because of all the wickedness they will have done by turning to other gods. 19 Now write down for yourselves the following song and teach it to the Israelites. Put it into their very mouths so that this song may serve as my witness against the Israelites! 20 For after I have brought them to the land I promised to their ancestors—one flowing with milk and honey—and they eat their fill and become fat, then they will turn to other gods and worship them; they will reject me and break my covenant.
Hosea 3:1
1 The Lord said to me, “Go, show love to your wife again, even though she loves another man and continually commits adultery. Likewise, the Lord loves the Israelites although they turn to other gods and love to offer raisin cakes to idols.” 2 So I paid 15 shekels of silver and about seven bushels of barley to purchase her. 3 Then I told her, “You must live with me many days; you must not commit adultery or become joined to another man, and I also will wait for you.”
Notes and References
"... Hosea is to love Gomer just like YHWH loves the 'sons of Israel', 'although (or in spite of the fact that) they are turning to other gods and are lovers of raisin cakes of grapes.' The collocation ('other gods') occurs sixty-three times in the Masoretic Text with its initial occurrence coming in the Decalogue (Exodus 20:13). Each of the other sixty-one occurrences seem to refer back to the first commandment. While Hosea no doubt alludes to Israel's violation of the first commandment, he does so through Deuteronomy 31:18, 20. Deuteronomy 31:18, 20 and Hosea 3:1 display nearly identical verbal and syntactical correspondence and represent the only instances of this particular verbal phrase in the Masoretic Text. The slight difference in the form resulting from Hosea's reuse of the verbal phrase within a concessive clause (i.e., participial form) ..."
Bass, Derek Drummond Hosea's Use of Scripture: An Analysis of His Hermeneutics (pp. 151-152) The Southern Baptist Theological Seminary, 2008