The great King of Israel, David, committed adultery with another man’s wife. To hide his sin, he had her husband killed. Problem solved? Not in the least. After the prophet Nathan confronts him with the severity of his deed, David admits to his sin. His full confession is recorded in Psalm 51. The verse that concerns us in this post is:
Against you, you only, have I sinned
and done what is evil in your sight,
so that you may be justified in your words
and blameless in your judgment.
Psalm 51:4 English Standard Version (ESV)
Speaking of David’s confession, John Calvin says:
Against You only…I conceive his meaning to be, that though all the world should pardon him, he felt that God was the Judge with whom he had to do, that conscience hailed him to his bar, and that the voice of man could administer no relief to him, however much he might be disposed to forgive, or to excuse, or to flatter. His eyes and his whole soul were directed to God, regardless of what man might think or say concerning him.
…There is every reason to believe that David, in order to prevent his mind from being soothed into a false peace by the flatteries of his court, realized the judgment of God upon his offense, and felt that this was in itself an intolerable burden, even supposing that he should escape all trouble from the hands of his fellow-creatures.
On the import of the second couplet, Calvin says:
So that You may be justified…Any doubt upon the meaning of the words, however, is completely removed by the connection in which they are cited in Paul’s Epistle to the Romans,
“For what if some did not believe? Shall God be unjust? God forbid: yea, let God be true, but every man a liar; as it is written, ‘That thou may be justified in thy sayings, and might overcome when thou art judged.’” — Romans 3:3, 4
Here the words before us are quoted in proof of the doctrine that God’s righteousness is apparent even in the sins of men, and his truth in their falsehood.
To have a clear apprehension of their meaning, it is necessary that we reflect upon the covenant which God had made with David. The salvation of the whole world having been in a certain sense deposited with him by this covenant, the enemies of religion might take occasion to exclaim upon his fall, “Here is the pillar of the Church gone, and what is now to become of the miserable remnant whose hopes rested upon his holiness?”
…Aware that such attempts might be made to impugn the righteousness of God, David takes this opportunity of justifying [God’s righteousness], and charging himself with the whole guilt of the transaction. He declares that God was justified…should he have spoken the sentence of condemnation against him for his sin, as [God] might have done but for his gratuitous mercy.
Of course, the knowledge that our sin offends God most should not excuse us from seeking our brother’s or sister’s forgiveness. However, we should fear all the more, having been forgiven by others, that we did sin against Him who purchased us at great cost to Himself.
Life of David, Lecture 13 – David and Bathsheba, R. C. Sproul, Ligonier Ministries