What is Psalm 18:20 talking about?
I was surprised to read in Psalm 18:20 that “the Lord rewarded me according to my righteousness.” Is not that justification by works?
It certainly sounds like it, but it is not. Before addressing the statement quoted, let us first consider the psalmist’s understanding of the human condition before God and the meaning of God’s righteousness in the Psalms.
The Human Condition: When it comes to the natural goodness of humans, the Psalms are very clear: “There is none who does good, no, not one” (Ps. 14:3; cf. Rom. 3:12). Sinfulness belongs to the human condition (Ps. 32:1) to the point that humans commit sins that they do not even know about (Ps. 19:12). Our sinfulness is a congenital or constitutional component of fallen human nature—“I was brought forth in iniquity, and in sin my mother conceived me” (Ps. 51:5). Now, with respect to being righteous before God, the psalmist declares, “In Your [God’s] sight no one living is righteous” (Ps. 143:2). Before God we all stand condemned for our lack of righteousness.
God’s Righteousness: The solution to our lack of righteousness is God’s righteousness. Divine righteousness is manifested in different ways in the life of Israel, but for our purpose the most important is the forgiveness of sins. In order for humans to stand before God without fear, sin has to be dealt with (cf. Ps. 130:3, 4). This is the exclusive work of God. David asked the Lord to forgive his sin, and promised that his “tongue [would] sing aloud of [God’s] righteousness,” that is to say, God’s forgiving and justifying grace (Ps. 51:14; cf. verses 1-7). God “executes [bestows] righteousness,” and consequently He does not deal with us “according to our sins” (Ps. 103:6, 10). Those whose sins have been forgiven are called “righteous” (Ps. 32:1, 2, 11). Hence, righteousness is a gift from God to us. Even those who are obedient to the Lord go to the temple seeking to receive “blessing from the Lord, and righteousness” (Ps. 24:5; cf. verses 3, 4), i.e., a divine declaration of righteousness. Isaiah clarifies that such Jesus shall declare many righteous, “for He shall bear their iniquities” (Isa. 53:11). God can impute righteousness to us because our sin was placed on the Servant of the Lord (Christ) instead of on us.
The Righteousness of Believers: Based on what we have discussed, the psalmist is not expressing justification through human works in the passage you quoted. The context clarifies that when he says “my righteousness” he is affirming his covenant faithfulness or what we call sanctifying grace. David declares his innocence, saying that he “has kept the ways of the Lord,” but not in a legalistic way, because, he adds, it is the Lord who “makes my way perfect” (Ps. 18:32). His righteous life is the result of the work of God in him and is grounded on God’s mercy and not on self-righteousness (verse 50). The psalmist mentions his righteous life in humility and dependence on God and not as an expression of pride, for he knows very well that the Lord “will save the humble people, but will bring down the haughty looks” (verse 27). Christ also expects us to live a righteous life (Matt. 5:20), and John categorically states: “He who practices righteousness is righteous, just as He [Jesus] is righteous” (1 John 3:7). Justification by faith leads to living a righteous life before God and others (cf. Mark 6:20).