In this Psalm, David pleads: “judge me, O LORD, according to my righteousness” (v.8). Compare this with, “Judge me, O LORD my God, according to thy righteousness” (Psalm 35:24). Surely no man wants to be judged according to his own righteousness but rather according to the imputed righteousness of God. If we were to be judged according to our own righteousness, we would also be judged according to our own sins and iniquities. Yet scripture states, “If thou, LORD, shouldest mark iniquities, O Lord, who shall stand?” (Psalm 130:3). I am blessed when God does not impute my sins to me (Psalm 32:1-2). So, how do we explain the statement found in Psalm 7:8? We explain it by the context of the psalm.
The seventh psalm refers to a specific attack on David. David has been falsely accused of wrongdoing. When he says, “O LORD my God, if I have done this” (v.3), he refers to a particular accusation. Throughout this psalm, David cries out to God for justice in this matter. If he has committed the alleged sin, let “the enemy persecute my soul, and take it” (v.5). Yet, David knows that he is not guilty in this matter. He cries, “Oh let the wickedness of the wicked come to an end” (v.9), and, “My defence is of God, which saveth the upright in heart” (v.10).
Yet, even in all his denial of wrongdoing, notice how he ends his song to the Lord. “I will praise the LORD according to his righteousness: and will sing praise to the name of the LORD most high” (v.17). After declaring God to be his defender, he changes his emphasis from “my righteousness” (v.8) to “his righteousness” (v.17). Though he asks God to vindicate him, he in turn exalts God.
How about you? Are you being wrongfully accused? Are you being attacked for something you did not do? O how we would like to avenge ourselves! How we would like to set the matter straight! But Paul admonishes us, “Dearly beloved, avenge not yourselves, but rather give place unto wrath: for it is written, Vengeance is mine; I will repay, saith the Lord” (Romans 12:19). Turn your wrath over to the Lord. Let him be your defense (v.10). Then praise Him for His righteousness and trust that He who made all things good will finally make all things right.