Two sides of David show up in the first three chapters of 1 Kings. First, we are reminded of his failings. Bathsheba the mother of Solomon is part of the story, jogging our memory of David’s transgressions in 2 Samuel 11. A more current critique is in verse 1.6 where David’s lack of discipline for his children was one reason why his son Adonijah set himself up as king.
But then in Chapter three, verse 8, Solomon’s prayer for wisdom includes the description of David that “he walked before you in faithfulness, in righteousness, and in uprightness of heart.” Indeed David’s psalms have a mixture of both sides: a sinner who walks uprightly with the LORD.
How do these two sides fit together? David is like Abraham, whose faith was counted to him as righteousness (Genesis 15.6). We know that Abraham was a deceiver who had his own family issues (Genesis 12, 20). We know that David, like Abraham believed in the One True God and was a man after His own heart.
It is an encouragement that Old Testament deceivers can be counted as righteous and upright. How much more solid it is that our faith in Jesus is buttressed by his historical substitutionary death on the cross. We do and will continue to sin. But we are and will be counted as righteous as we acknowledge our need for a savior, repent of our sinfulness, and “believe in him who raised from the dead Jesus our Lord, who was delivered up for our trespasses and raised for our justification.” (Romans 4.24-25).