Grace or Law for David? For All of Us? Ps 18:20-26

Is this contradictory to grace?

20 The Lord has dealt with me according to my righteousness;
    according to the cleanness of my hands he has rewarded me.
21 For I have kept the ways of the Lord;
    I am not guilty of turning from my God.
22 All his laws are before me;
    I have not turned away from his decrees.
23 I have been blameless before him
    and have kept myself from sin.
24 The Lord has rewarded me according to my righteousness,
    according to the cleanness of my hands in his sight.

25 To the faithful you show yourself faithful,
to the blameless you show yourself blameless,
26 to the pure you show yourself pure,
but to the devious you show yourself shrewd.

 

Even with Abraham the good news was always that there was righteousness through faith in the Messiah (Gen 15) and not by works (Gal 3).  But here it seems that David is saying that God gave him a great deliverance from his enemies because of his righteousness.

First it’s important to understand that David isn’t talking about salvation here.  He is talking about an event in which God came down in David’s distress and gave him a mighty victory.  Clearly he knows that the Lord is his salvation and deliverer (Ps 18:2) and not his own doing.

Instead, what he is saying that as the battle lines were drawn, God was inclined to help David have the victory.  This was not always the case in Israel’s history.  Sometimes Israel was defeated by its enemies as a form of discipline and punishment for the wickedness of Israel.  In fact, Israel would later be completely deported as a means of having to deal with Israel’s sin.

But in this case, David walked in righteousness and with a clean conscience.  He wasn’t walking in sin that God needed to bring discipline or judgment to him.  And because of that, it was David who was helped and got the victory over his enemies.

So it isn’t an issue of grace or law even.  It’s an issue of there are times when the Lord has to discipline us because of our sins, but this wasn’t one of those times.  God doesn’t have to help us when we are walking in righteousness, nor does he always preserve us from hard things because we are walking in his ways, but rather in this instance God had no need to bring judgment or discipline to David as he was walking in the ways of the Lord.  Rather the Lord honored him for his heart after the Lord and brought deliverance to David and his men.