11 Thus Solomon finished the house of the LORD and the king's palace, and successfully completed all that he had planned on doing in the house of the LORD and in his palace. 12 Then the LORD appeared to Solomon at night and said to him, "I have heard your prayer and have chosen this place for Myself as a house of sacrifice. 13 "If I shut up the heavens so that there is no rain, or if I command the locust to devour the land, or if I send pestilence among My people, 14 and My people who are called by My name humble themselves and pray and seek My face and turn from their wicked ways, then I will hear from heaven, will forgive their sin and will heal their land. 15 "Now My eyes will be open and My ears attentive to the prayer offered in this place. 16 "For now I have chosen and consecrated this house that My name may be there forever, and My eyes and My heart will be there perpetually. 17 "As for you, if you walk before Me as your father David walked, even to do according to all that I have commanded you, and will keep My statutes and My ordinances, 18 then I will establish your royal throne as I covenanted with your father David, saying, 'You shall not lack a man to be ruler in Israel.'
19 "But if you turn away and forsake My statutes and My commandments which I have set before you, and go and serve other gods and worship them, 20 then I will uproot you from My land which I have given you, and this house which I have consecrated for My name I will cast out of My sight and I will make it a proverb and a byword among all peoples. 21 "As for this house, which was exalted, everyone who passes by it will be astonished and say, 'Why has the LORD done thus to this land and to this house?' 22 "And they will say, 'Because they forsook the LORD, the God of their fathers who brought them from the land of Egypt, and they adopted other gods and worshiped them and served them; therefore He has brought all this adversity on them.'"