King David was in the wrong place as described in 2 Samuel 11:1-4 and the sin with Bathsheba occurred. When confronted by Nathan, David confessed his sin: “Then David said to Nathan, ‘I have sinned against the LORD.’ And Nathan said to David, ‘The LORD also has taken away your sin; you shall not die’” [a] He then wrote Psalm 51, a contrite sinner’s prayer for pardon.
However, his sin with Bathsheba directly or indirectly resulted in the death of Bathsheba’s husband Uriah who was one of David’s top 30 soldiers, the death of Bathsheba and David’s son [b] the rape of David’s daughter Tamar [c], the death of David’s son Amnon [d], the rebellion and death of his son Absalom [e],the shameful advice of Ahithopel to Absalom –followed by Abasalom [m], suicide of David’s counselor and Bathsheba’s grandfather Ahithopel after Absalom rejected his advice on going after David [f], the death of an unknown number of Israelite soldiers that followed Absalom or David during the rebellion [g], and the physical illness of David [h]. David wrote Psalms 4 as he fled from Absalom. Read 2 Samuel 11-19 for full context.
There was a consequence of sin even though David was forgiven and included in the genealogy of Jesus in Matthew 1:6 and in the Faith Hall of Fame in Hebrews 11:32. Jesus Christ our Redeemer paid the price for sin of all who believe on Him at the cross of Calvary. “He made Him who knew no sin to be sin on our behalf, so that we might become the righteousness of God in Him” [i]. This literally means at salvation Jesus Christ covered the wrath for the believer’s sins for eternity. This means, “Therefore there is now no condemnation for those who are in Christ Jesus” [j] Does it mean we can sin without consequences after believing? Paul says no: “What shall we say then? Are we to continue in sin so that grace may increase? May it never be! How shall we who died to sin still live in it?” [k]
When disciples do sin we can receive forgiveness and we have an Advocate with the Father: “He is faithful and righteous to forgive us our sins and to cleanse us from all unrighteousness. I am writing these things to you so that you may not sin. And if anyone sins, we have an Advocate with the Father, Jesus Christ the righteous; [l]
a. 2 Samuel 12:13; b. 2 Samuel 12:13-23; c. 2 Samuel 13:1-23; d. 2 Samuel 13:24-29; e. 2 Samuel 15 & 18; f. 2 Samuel 17: 23; g. 2 Samuel 18 & 19; h. Psalm 32:3; I 2 Corinthians 5:21; j. Romans 8:1; k. Romans 6:1-2; l. 1 John 1:9;2:1; m. 2 Samuel 16:20-23.