The story behind Psalm 51:10
The psalm's heading links it to King David after the prophet Nathan confronted him over his adultery with Bathsheba and the arranged death of her husband Uriah (2 Samuel 11-12). It was written as a prayer of confession and was meant for Israel's public worship, addressed to the chief musician. A king's personal repentance became a song God's people could pray together.