1 Kings 9:4

4 As for you, if you live in my presence as your father David lived, pure in heart and action, living the life I've set out for you, attentively obedient to my guidance and judgments,

1 Kings 9:4 Meaning and Commentary

1 Kings 9:4

And if thou wilt walk before me, as David thy father walked, in
integrity of heart, and in uprightness.
&c.] Who, though guilty of many sins and failings in life, yet was sincere and upright in the worship of God, never apostatized from it, or fell into idolatry, which is what is chiefly respected:

to do according to all that I have commanded thee, and wilt keep my
statutes and my judgments;
observe all the laws of God, moral, ceremonial, and judicial.

1 Kings 9:4 In-Context

2 God appeared to Solomon again, just as he had appeared to him at Gibeon.
3 And God said to him, "I've listened to and received all your prayers, your ever-so-passionate prayers. I've sanctified this Temple that you have built: My Name is stamped on it forever; my eyes are on it and my heart in it always.
4 As for you, if you live in my presence as your father David lived, pure in heart and action, living the life I've set out for you, attentively obedient to my guidance and judgments,
5 then I'll back your kingly rule over Israel, make it a sure thing on a solid foundation. The same guarantee I gave David your father I'm giving you: 'You can count on always having a descendant on Israel's throne.'
6 "But if you or your sons betray me, ignoring my guidance and judgments, taking up with alien gods by serving and worshiping them,
Published by permission. Originally published by NavPress in English as THE MESSAGE: The Bible in Contemporary Language copyright 2002 by Eugene Peterson. All rights reserved.