The king had a big problem of his own making.
Lust, deception, lies, manipulation, murder - one thing after another.
But God saw everything
And so, he sent a messenger to confront him with the truth
(And the truth will never yield to falsehood, no matter how sophisticated the cover - up).
David knew he was in a corner, and being a man after God's own heart, he owned up.
Honesty.
"I have sinned against the Lord" God said (through the messenger)
"I have taken away your sin"
David hoped that the illegitimate child would live, but it was not to be.
So, David got up and worshipped God
Then he took the woman to be his own wife, and slept with her.
The very woman he slept with before.
Astounding.
But David knew the heart of God, and knew that when God said "You are forgiven", that was it.
Forgiven, from the most awful deeds.
And now, he knew how to live forgiven.
It was over. I
ntimacy restored - a testimony to the outrageous grace of God.