Psalms 51:1-9

1 To the Overseer. -- A Psalm of David, in the coming inn unto him of Nathan the prophet, when he hath gone in unto Bath-Sheba. Favour me, O God, according to Thy kindness, According to the abundance of Thy mercies, Blot out my transgressions.
2 Thoroughly wash me from mine iniquity, And from my sin cleanse me,
3 For my transgressions I do know, And my sin [is] before me continually.
4 Against Thee, Thee only, I have sinned, And done the evil thing in Thine eyes, So that Thou art righteous in Thy words, Thou art pure in Thy judging.
5 Lo, in iniquity I have been brought forth, And in sin doth my mother conceive me.
6 Lo, truth Thou hast desired in the inward parts, And in the hidden part Wisdom Thou causest me to know.
7 Thou cleansest me with hyssop and I am clean, Washest me, and than snow I am whiter.
8 Thou causest me to hear joy and gladness, Thou makest joyful bones Thou hast bruised.
9 Hide Thy face from my sin. And all mine iniquities blot out.

Psalms 51:1-9 Meaning and Commentary

To the chief Musician, A Psalm of David, when Nathan the prophet came unto him, after he had gone in to Bathsheba. The occasion of this psalm was the sin of David with Bathsheba, signified by "going in to her"; an euphemism for "lying with her"; which sin was a very aggravated one, she being another man's wife, and the wife of a servant and soldier of his, who was at the same time exposing his life for his king and country's good; and David besides had many wives, and was also king of Israel, and should have set a better example to his subjects; and it was followed with other sins, as the murder of Uriah, and the death of several others; with scandal to religion, and with security and impenitence in him for a long time, until Nathan the prophet was sent to him of God, to awaken him to a sense of his sin; which he immediately acknowledged, and showed true repentance for it: upon which, either while Nathan was present, or after he was gone, he penned this psalm; that it might remain on record, as a testification of his repentance, and for the instruction of such as should fall into sin, how to behave, where to apply, and for their comfort. The history of all this may be seen in the eleventh and twelfth chapters of the second book of Samuel.
Young's Literal Translation is in the public domain.