Psalm 31:1 (ESV)
To the choirmaster. A Psalm of David.
In you, O Lord, do I take refuge;
let me never be put to shame;
in your righteousness deliver me!
How is it righteous for God to deliver His people? It could be that David has been falsely accused and that since it would be wrong for him to be held accountable for something he did not do, God would be righteous in not letting him be put to shame for something it.
But there is a greater application of this than just asking God to treat us fairly. This is Gospel truth. The cross of Christ is a demonstration of the righteousness of God (Romans 3:21-25). The cross shows that God is righteous. It does that through Jesus being a propitiation for our sins.
In His righteousness God cannot allow sin to go unpunished. In His love He cannot allow Hie chosen ones to eternally perish. Jesus comes and pays the penalty for our sins, satisfying the justice of God. See the righteousness of God when you see Jesus on the cross. This is why we can cry the prayer of Psalm 31:1.
The reason we can ask God to deliver us and be righteous in doing so is because our sins have already been paid for by Christ on the cross. The reason we are able to take refuge in Christ at all is because He died for us. The reason we can flee to God and not be destroyed is because He has already destroyed His Son for us. “O Lord” we cry, “It would not be righteous for you to put us to shame, since you have already put Jesus to shame for us. Rescue us in your righteousness.”
It is a bold request to ask God to act righteously for us seeing that we deserve nothing but judgement and hell. But Jesus bore our sins in His own body on the tree and it would be unrighteous for Him to refuse to hear us when we come to him through the One who paved the way to God for us.
This is why John can say that God is faithful and just to forgive us our sins? How can forgiving me be an act of justice? Because He has already punished the sin and He will not punish it again. Christians have no fear of judgement (I John 4:18). We come boldly into His presence because of the work of Christ and confidently plead the merits of Christ, knowing that the faithful God will honour the work of His Son on our behalf. What a glory the Gospel is!!