2 Then the Lord appeared to Solomon a second time, as he had done before at Gibeon. 3 The Lord said to him, "I have heard your prayer and your petition. I have set this Temple apart to be holy-this place you have built where my name will be honored forever. I will always watch over it, for it is dear to my heart. 4 "As for you, if you will follow me with integrity and godliness, as David your father did, obeying all my commands, decrees, and regulations, 5 then I will establish the throne of your dynasty over Israel forever. For I made this promise to your father, David: 'One of your descendants will always sit on the throne of Israel.' 6 "But if you or your descendants abandon me and disobey the commands and decrees I have given you, and if you serve and worship other gods, 7 then I will uproot Israel from this land that I have given them. I will reject this Temple that I have made holy to honor my name. I will make Israel an object of mockery and ridicule among the nations. 8 And though this Temple is impressive now, all who pass by will be appalled and will gasp in horror. They will ask, 'Why did the Lord do such terrible things to this land and to this Temple?' 9 "And the answer will be, 'Because his people abandoned the Lord their God, who brought their ancestors out of Egypt, and they worshiped other gods instead and bowed down to them. That is why the Lord has brought all these disasters on them.'"
Matthew Henry's Commentary on 1 Kings 9:2-9
Commentary on 1 Kings 9:1-9
(Read 1 Kings 9:1-9)
God warned Solomon, now he had newly built and dedicated the temple, that he and his people might not be high-minded, but fear. After all the services we can perform, we stand upon the same terms with the Lord as before. Nothing can purchase for us liberty to sin, nor would the true believer desire such a licence. He would rather be chastened of the Lord, than be allowed to go on with ease and prosperity in sin.