The Lord grew angry with Solomon, because his heart had turned away from being with the Lord, the God of Israel, who had appeared to him twice.