At first sight, verses such as these might appear to show a self-righteous attitude and perhaps that the warrior-king David was proud of his own goodness. If you were to say the same things to your friends, you know how they would react! But there are two factors to consider in looking at verses like these and understanding what David meant:
1) What righteousness means in the Old Testament. First, we must understand that the concept of righteousness in the Old Testament is somewhat different from what we find today and in the New Testament. In the Hebrew Bible the word sedek which is often translated as “righteousness” literally means “straightness” as opposed to “crookedness,” but it is usually used of the status of relationships rather than as an abstract measure of perfection. Under the Law of Moses one could be righteous by simply maintaining one’s relationship with God and others according to basic legal norms – the term did not denote some kind of perfect purity or spiritual perfection.
Anyone who did not murder, cheat, lie to, or otherwise harm other individuals maintained a proper relationship with them and was therefore “righteous.” This is different, of course, from the deeper expectations of the New Testament, which more frequently stress the importance of other things such as right motivation and attitude behind the behavior. As a result of the earlier concept of righteousness seen in most of the books of the Old Testament, when a person fulfilled the basic demands of a relationship he or she could be said to be “righteous,” and many of the times that David uses the term sedek, it is from this perspective. David was righteous in Hebrew terms simply because he lived within the expectations of the covenant and the community of God’s people.
2) What David also says regarding sin and righteousness. Even though David could see himself as being righteous in terms of how his society used the term, we find plenty of evidence that he was not proudly self-righteous. We know that David sinned and knew that he sinned (Psalm 51, etc.), so it is clear he did not imagine himself perfect in our modern sense of righteousness. We also know that David earnestly asked God to help him walk in the way of righteousness, as we see, for example, in Psalm 19: “Keep back your servant also from presumptuous sins; let them not have dominion over me. Then I shall be blameless, and I shall be innocent of great transgression” (Psalm 19:13).
Finally, we know that beyond asking God’s help to walk righteously, David openly gave God the credit when he did do what was right. In Psalm 18 – the same psalm we quote above regarding David’s expressions of righteousness – we also find: “It is God who arms me with strength, and makes my way perfect” (Psalm 18:32). This same attitude of humbly crediting God with his righteousness is frequently confirmed in other psalms, as when David says: “You are my Lord, my goodness is nothing apart from You” (Psalm 16:2b)
So, there is no indication in the psalms of David, or elsewhere, that David was self-righteous or proud of his own goodness. While it is clear that David knew that at most times he did walk righteously according to the use of this concept in his own culture, it is equally clear that he asked God’s help to do so and gave God credit when he succeeded.
* For further understanding of the psalms of King David, download our free e-book Spotlight on the Psalms here.