The lord was very angry with Solomon, for his heart had turned away from the lord, the God of Israel, who had appeared to him twice.