Ezekiel 16.
In it, God describes Israel as an orphaned female infant left out on the ground, forsaken and unloved. God takes care of Israel and raises her in love, crowns her with wonderful clothes, jewelry, etc, and becomes her Husband. However, Israel grows up and becomes a prostitute who uses her God-given jewelry to lure her many lovers to bed. God goes on to describe her in such a horrible, horrible manner, telling of all her wicked deeds. Then, out of nowhere, He says:
"Nevertheless, I will remember My covenant with you in the days of your youth, and I will establish an everlasting covenant with you. Then you will remember your ways and be ashamed when you receive your sisters, both your older and your younger; and I will give them to you as daughters, but not because of your covenant." Thus I will establish My covenant with you, and you shall know that I am the LORD,so that you may remember and be ashamed and never open your mouth anymore because of your humiliation, when I have forgiven you for all that you have done," the Lord GOD declares.