When Solomon had finished the temple of the Lord and the royal palace, and had succeeded in carrying out all he had in mind to do in the temple of the Lord and in his own palace, the Lord appeared to him at night and said: “I have heard your prayer and have chosen this place for myself as a temple for sacrifices. “When I shut up the heavens so that there is no rain, or command locusts to devour the land or send a plague among my people, if my people, who are called by my name, will humble themselves and pray and seek my face and turn from their wicked ways, then I will hear from heaven, and I will forgive their sin and will heal their land. Now my eyes will be open and my ears attentive to the prayers offered in this place.
I have chosen and consecrated this temple so that my Name may be there forever. My eyes and my heart will always be there. “As for you, if you walk before me faithfully as David your father did, and do all I command, and observe my decrees and laws, I will establish your royal throne, as I covenanted with David your father when I said, ‘You shall never fail to have a successor to rule over Israel.’ “But if you turn away and forsake the decrees and commands I have given you and go off to serve other gods and worship them, then I will uproot Israel from my land, which I have given them, and will reject this temple I have consecrated for my Name. I will make it a byword and an object of ridicule among all peoples. This temple will become a heap of rubble. All who pass by will be appalled and say, ‘Why has the Lord done such a thing to this land and to this temple?’ People will answer, ‘Because they have forsaken the Lord, the God of their ancestors, who brought them out of Egypt, and have embraced other gods, worshiping and serving them—that is why he brought all this disaster on them.’”