Even though the Lord, the God of Israel, had appeared to Solomon twice and had commanded him not to worship foreign gods, Solomon did not obey the Lord but turned away from him. So the Lord was angry with Solomon
the Lord appeared to him at night. He said to him, “I have heard your prayer, and I accept this Temple as the place where sacrifices are to be offered to me.