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