Ps 51:4

51:4 you only. David committed adultery with Bathsheba and sent her husband to his death. How can he say he sinned against God only? Rebellion against God was the root of his sin, and his crime injured people who belonged to God and transgressed a social order created by God.

justified . . . blameless. David recognized that God’s anger against him was just. This verse is cited by Paul in Rom. 3:4.