1 Kings 11:9

So the LORD became angry with Solomon, because his heart had turned from the LORD God of Israel, who had appeared to him twice,