This is the final statement made by the one who is lamenting their sexual sin of adultery. It is filled with a tremendous amount of regret - and yet even in this cry of horror over sin, there is hope for those who will be instructed by it.
First we have a warning to those who think that adultery and sexual sin only inhabit the world outside the church. This person - David - said that he was almost to the point of utter ruin in the midst of the assembly and congregation. To think that the devil, the flesh, and the world only are problems for those outside the church is to set yourself up for ruin.
David experienced these things "IN THE MIDST OF THE ASSEMBLY AND CONGREGATION." Oh, how we need to take heed from this statement that we are not beyond the reach of sin just because we go to church. The fact is that we are WELL WITHIN THE REACH OF SIN no matter where we are on earth. David unfortunately forgot this as he walked upon the roof of his house in Jerusalem. He forgot that it was the time when kings should be going out to war. He forgot that even if he was king - he needed to be doing God's bidding rather than his own. He forgot that being lazy and undisciplined will cost us in the end. He forgot that being in the wrong place at the wrong time - will lead to wrong actions.
God never promises to us a "place" where we can be safe from all temptation and sin. There is NO place on earth where this exists. No matter where you go on earth - there will be temptation and there will be a need to draw near to God and look to Him for protection. There is only a "person" of safety - and that is the Lord our God. When we draw near to Him we find deliverance and safety. When we walk with Him and turn to Him - we are with the Only One Who can deliver us from all our temptations and sins. If David had remembered this he would have realized that he was in far greater danger at home without the presence of God in his life - than if he were in the midst of a fierce battle with God there within.
The one thing that grants me hope in reading this verse is the word "almost." One would think that David would have been utterly ruined by his adultery. Please do not misunderstand that he was going to have to pay a very heavy price before this was over. He would lose no less than 4 children in this situation. He would have 10 concubines raped by his own son in broad daylight in front of all Israel. His kingdom would be divided and many would lose their lives in battles that would ensue. The losses would be huge - and yet it was "almost" utter ruin.
God offers grace and forgiveness even in the most horrible of situations. David took advantage of this grace and fell upon the mercies of God in the end. God would forgive him and restore him to the joy of his salvation. Truly this is one of the most amazing stories of mercy and grace in all the Scriptures. Yet, David, in offering this glimmer of hope in the midst of his cry of despair still is warning us - pleading with us to remember him. He is pleading with us to remember the high cost of adultery and unfaithfulness to God's call for purity in our lives. May we see both the warning and the wonder of this passage. A warning against adultery and sexual sin - and the wonder of God's grace and forgiveness that can save us even in the worst of sitautions and circumstances.