When Solomon had finished building the temple of the LORD and the royal palace, and had achieved all he had desired to do,
the LORD appeared to him a second time, as he had appeared to him at Gibeon.
The LORD said to him: “I have heard the prayer and plea you have made before me; I have consecrated this temple, which you have built, by putting my Name there forever. My eyes and my heart will always be there.
“As for you, if you walk before me faithfully with integrity of heart and uprightness, as David your father did, and do all I command and observe my decrees and laws,
I will establish your royal throne over Israel forever, as I promised David your father when I said, ‘You shall never fail to have a successor on the throne of Israel.’
“But if you or your descendants turn away from me and do not observe the commands and decrees I have given you and go off to serve other gods and worship them,
then I will cut off Israel from the land I have given them and will reject this temple I have consecrated for my Name. Israel will then become 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 will scoff 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 their God, who brought their ancestors out of Egypt, and have embraced other gods, worshiping and serving them—that is why the LORD brought all this disaster on them.’ ”