1 Kings 9:6
But if ye shall at all turn from following me, ye or your children, and will not keep my commandments and my statutes which I have set before you, but go and serve other gods, and worship them: But if ye shall at all turn from following me, ye or your children, and will not keep my commandments and my statutes which I have set before you, but go and serve other gods, and worship them:
The warning was given by God to Solomon after the building and dedication of the temple, and it reached beyond him to his children and descendants and to Israel as a people, that if they should at all turn from following Him, refuse to keep His commandments and statutes set before them, and go and serve and worship other gods, judgment would follow. All of God's promises, blessing, favor, and Israel's special standing were conditional on continued faithfulness and obedience, and the continuance of the temple itself depended on that obedience. Turning from God in this way separates people from Heaven, for God does not separate Himself from them, but they separate themselves from Him by departing from His law. The threatened result was forfeiture of God's favor and a promised calamity and judgment: loss of Israel's land, rejection of the temple, and becoming a reproach among the nations.
The holiness, splendor, and promised permanence of the temple did not protect an unfaithful people, for while Israel remained faithful the temple was to stand as a lasting sign of God's special favor and blessing on an obedient people, yet God was not confined to the temple and could visit and encourage the faithful in captivity and distress through special revelations of His glory. Israel was called peculiar because alone among the nations it preserved the true worship of God by keeping His commandments, and its departure from God brought the warned calamity centuries later in captivity and the destruction of the temple, fulfilling the warning. Solomon himself illustrates the warning, for despite remarkable signs of divine power, building the temple, and praying at its dedication, he later failed to keep God's command and turned his heart from the Lord to worship idols, with idolatrous marriages and worldly alliances showing the departure, proving that divine light and privilege did not keep him faithful, while God blessed him while he followed the right way and remained separate from idolatry. The warning applies to anyone entrusted with responsibility in God's work, for power and responsibility beyond proper bounds can become a snare and ruin the soul, so strength of character, obedience to God, and remaining distinct from the world and idolatry are essential to retain His blessing.