God considered He was married to true Israel.
Isaiah 54:5 “For your Maker is your husband; Yahweh of Armies is his name: and the Holy One of Israel is your Redeemer; the God of the whole earth shall he be called.”
More of the story is in Ezekiel 23, Romans 7:1-4, Jeremiah 3:8 and easily a couple dozen other passages as well. It is the greatest continuing love story found in scripture.