Psalms 51:12-19

12 Restore to me the joy of Your salvation, And uphold me by Your generous Spirit.
13 Then I will teach transgressors Your ways, And sinners shall be converted to You.
14 Deliver me from the guilt of bloodshed, O God, The God of my salvation, And my tongue shall sing aloud of Your righteousness.
15 O Lord, open my lips, And my mouth shall show forth Your praise.
16 For You do not desire sacrifice, or else I would give it; You do not delight in burnt offering.
17 The sacrifices of God are a broken spirit, A broken and a contrite heart-- These, O God, You will not despise.
18 Do good in Your good pleasure to Zion; Build the walls of Jerusalem.
19 Then You shall be pleased with the sacrifices of righteousness, With burnt offering and whole burnt offering; Then they shall offer bulls on Your altar.

Psalms 51:12-19 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.
Scripture taken from the New King James Version. Copyright © 1982 by Thomas Nelson, Inc. Used by permission. All rights reserved.