20. Jehovah rewarded me according to my righteousness; he recompensed me according to the cleanness of my hands. 21. For I have kept the ways of Jehovah, and have not wickedly departed from my God. 22. For all his judgments were before me, nor did I put away his statutes [or ordinances] from me. 23. I was also upright with him,1 and kept myself from my iniquity. 24. Therefore Jehovah hath recompensed me according to my righteousness, according to the cleanness of my hands before his eyes.
20. Jehovah rewarded me. David might seem at first sight to contradict himself; for, while a little before he declared that all the blessings which he possessed were to be traced to the good pleasure of God, he now boasts that God rendered to him a just recompense. But if we remember for what purpose he connects these commendations of his own integrity with the good pleasure of God, it will be easy to reconcile these apparently conflicting statements. He has before declared that God was the sole author and originator of the hope of coming to the kingdom which he entertained, and that he had not been elevated to it by the suffrages of men, nor had he rushed forward to it through the mere impulse of his own mind, but accepted it because such was the will of God. Now he adds, in the second place, that he had yielded faithful obedience to God, and had never turned aside from his will. Both these things were necessary; first, that God should previously show his favor freely towards David, in choosing him to be king; and next, that David, on the other hand, should, with an obedient spirit, and a pure conscience, receive the kingdom which God thus freely gave him; and farther, that whatever the wicked might attempt, with the view of overthrowing or shaking his faith, he should nevertheless continue to adhere to the direct course of his calling. Thus, then, we see that these two statements, so far from disagreeing with each other, admirably harmonise. David here represents God as if the president2 of a combat, under whose authority and conduct he had been brought forth to engage in the combats. Now that depended upon election, in other words, upon this, that God having embraced him with his favor, had created him king. He adds in the verses which immediately follow, that he had faithfully performed the duties of the charge and office committed to him even to the uttermost. It is not, therefore, wonderful if God maintained and protected David, and even showed, by manifest miracles, that he was the defender of his own champion,3 whom he had, of his own free choice, admitted to the combat, and who he saw had performed his duty with all fidelity. We ought not, however, to think that David, for the sake of obtaining praise among men, has here purposely indulged in the language of vain boasting; we ought rather to view the Holy Spirit as intending by the mouth of David to teach us the profitable doctrine, that the aid of God will never fail us, provided we follow our calling, keep ourselves within the limits which it prescribes, and undertake nothing without the command or warrant of God. At the same time, let this truth be deeply fixed in our minds, that we can only begin an upright course of life when God of his good pleasure adopts us into his family, and in effectually calling, anticipates us by his grace, without which neither we nor any creature would give him an opportunity of bestowing this blessing upon us.4
There, however, still remains one question. If God rendered to David a just recompense, it may be said, does it not seem, when he shows himself liberal towards his people, that he is so in proportion as each of them has deserved? I answer, When the Scripture uses the word reward or recompense, it is not to show that God owes us any thing, and it is therefore a groundless and false conclusion to infer from this that there is any merit or worth in works. God, as a just judge, rewards every man according to his works, but he does it in such a manner, as to show that all men are indebted to him, while he himself is under obligation to no one. The reason is not only that which St Augustine has assigned, namely, that God finds no righteousness in us to recompense, except what he himself has freely given us, but also because, forgiving the blemishes and imperfections which cleave to our works, he imputes to us for righteousness that which he might justly reject. If, therefore, none of our works please God, unless the sin which mingles with them is pardoned, it follows, that the recompense which he bestows on account of them proceeds not from our merit, but from his free and undeserved grace. We ought, however, to attend to the special reason why David here speaks of God rewarding him according to his righteousness. He does not presumptuously thrust himself into the presence of God, trusting to or depending upon his own obedience to the law as the ground of his justification; but knowing that God approved the affection of his heart, and wishing to defend and acquit himself from the false and wicked calumnies of his enemies, he makes God himself the judge of his cause. We know how unjustly and shamefully he had been loaded with false accusations, and yet these calumnies did not so much bear against the honor and name of David as against the welfare and estate of the whole Church in common. It was indeed mere private spite which stirred up Saul, and drove him into fury against David, and it was to please the king that all other men were so rancorous against an innocent individual, and broke forth so outrageously against him; but Satan, there is no doubt, had a prime agency in exciting these formidable assaults upon the kingdom of David, and by them he endeavored to accomplish his ruin, because in the person of this one man God had placed, and, as it were, shut up the hope of the salvation of the whole people. This is the reason why David labors so carefully and so earnestly to show and to maintain the righteousness of his cause. When he presents and defends himself before the judgment-seat of God against his enemies, the question is not concerning the whole course of his life, but only respecting one certain cause, or a particular point. We ought, therefore, to attend to the precise subject of his discourse, and what he here debates. The state of the matter is this:His adversaries charged him with many crimes; first, of rebellion and treason, accusing him of having revolted from the king his father-in-law; in the second place, of plunder and robbery, as if, like a robber, he had taken possession of the kingdom; thirdly, of sedition, as if he had thrown the kingdom into confusion when it enjoyed tranquillity; and, lastly, of cruelty and many flagitious actions, as if he had been the cause of murders, and had prosecuted his conspiracy by many dangerous means and unlawful artifices. David, in opposition to these accusations, with the view of maintaining his innocence before God, protests and affirms that he had acted uprightly and sincerely in this matter, inasmuch as he attempted nothing without the command or warrant of God; and whatever hostile attempts his enemies made against him, he nevertheless always kept himself within the bounds prescribed by the Divine Law. It would be absurd to draw from this the inference that God is merciful to men according as he judges them to be worthy of his favor. Here the object in view is only to show the goodness of a particular cause, and to maintain it in opposition to wicked calumniators; and not to bring into examination the whole life of a man, that he may obtain favor, and be pronounced righteous before God. In short, David concludes from the effect and the issue, that his cause was approved of by God, not that one victory is always and necessarily the sign of a good cause, but because God, by evident tokens of his assistance, showed that he was on the side of David.
21. For I have kept the ways of Jehovah. He had spoken in the preceding verse of the cleanness of his hands, but finding that men judged of him perversely, and were very active in spreading evil reports concerning him,5 he affirms that he had kept the ways of the Lord, which is equivalent to his appealing the matter to the judgment-seat of God. Hypocrites, it is true, are accustomed confidently to appeal to God in the same way; yea, there is nothing which they are more forward in doing than in dallying with the sacred name of God, and making it a cover to conceal their hypocrisy; but David brings forward nothing which men might not have certainly known to be true, if any regard to justice had existed among them. Let us, therefore, from his example, endeavor above all things to have a good conscience. And, in the second place, let us have the magnanimity to despise the false judgments of men, and to look up to heaven for the vindicator of our character and cause. He adds, I have not wickedly departed from my God. This implies, that he always aimed directly at the mark of his calling, although the ungodly attempted many things to overthrow his faith. The verb which he uses does not denote one fall only, but a defection which utterly removes and alienates a man from God. David, it is true, sometimes fell into sin through the weakness of the flesh, but he never desisted from following after godliness, nor deserted the service to which God had called him.
22. For all his judgments were before me. He now shows how he came to possess that unbending rectitude of character, by which he was enabled to act uprightly amidst so many and so grievous temptations, namely, because he always applied his mind to the study of the law of God. As Satan is daily making new assaults upon us, it is necessary for us to have recourse to arms, and it is meditation upon the Divine Law which furnishes us with armor to resist. Whoever, therefore, would desire to persevere in uprightness and integrity of life, let them learn to exercise themselves daily in the study of the word of God; for, whenever a man despises or neglects instruction, he easily falls into carelessness and stupidity, and all fear of God vanishes from his mind. I do not intend here to make any subtle distinction between these two words, judgments and ordinances. If, however, any person is inclined to make a distinction between them, the best distinction is to refer judgments to the second table of the law, and ordinances, or statutes, which in Hebrew are called twkwx, chukoth, to the duties of piety and the exercises immediately connected with the worship of God.
23. I was also upright with him. All the verbs in this verse are put by David in the future tense, I will be upright, etc. because he does not boast of one act only, or of a good work performed by fits and starts, but of steady perseverance in an upright course. What I have said before, namely, that David takes God for his judge, as he saw that he was wrongfully and unrighteously condemned by men, appears still more clearly from what he here says, "I have been upright with him." The Scriptures, indeed, sometimes speak in similar terms of the saints, to distinguish them from hypocrites, who content themselves with wearing the outward mask of religious observances; but it is to disprove the false reports which were spread against him that David thus confidently appeals to God with respect to them. This is still more fully confirmed by the repetition of the same thing which is made a little after, According to the cleanness of my hands before his eyes. In these words there is evidently a contrast between the eyes of God and the blinded or malignant eyes of the world; as if he had said, I disregard false and wicked calumnies, provided I am pure and upright in the sight of God, whose judgment can never be perverted by malevolent or other vicious and perverse affections. Moreover, the integrity which he attributes to himself is not perfection but sincerity, which is opposed to dissimulation and hypocrisy. This may be gathered from the last clause of the 23rd verse, where he says, I have kept myself from my iniquity. In thus speaking, he tacitly acknowledges that he had not been so pure and free from sinful affections as that the malignity of his enemies did not frequently excite indignation within him, and gall him to the heart. He had therefore to fight in his own mind against many temptations, for as he was a man, he must have felt in the flesh on many occasions the stirrings of vexation and anger. But this was the proof of his virtue, that he imposed a restraint upon himself, and refrained from whatever he knew to be contrary to the word of God. A man will never persevere in the practice of uprightness and of godliness, unless he carefully keep himself from his iniquity.