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