"I am blameless before God; I have kept myself from sin. The Lord rewarded me for doing right, because of my innocence in his sight." 2 Samuel 22:17-25
King David wrote this at the end of his life. The same King David who committed adultery and murder says at the end of his life, "I am blameless".
How is this? David knew the power of the forgiveness of God. David knew his covenant with the Lord and he knew the heart of God. In 1Kings 15:3, it says that David's heart was perfect with the Lord. After all, His claim to fame is that he was known as a man after God's own heart.
When you think about David's past and how he is viewed historically, we can get a clear understanding how God redeems the past and how He does not measure us by our biggest failures.
My history is as soiled as David's. Perhaps yours is as well. Yet, I understand how David can write these words free from the condemnation of past sins. We too can say with confidence,
"God is my rescuer. He has delivered me. He has upheld me. He has led me to a place of safety. He rescued me because He delights in me. I am blameless before God. I am innocent in his sight. He has blessed me beyond measure."