The story of David and Bathsheba is one of the most dramatic accounts in the Old Testament. One night in Jerusalem, King David was walking upon his rooftop when he spotted a beautiful woman bathing nearby (2 Samuel 11:2). David asked his servants about her and was told she was Bathsheba, the wife of Uriah the Hittite, one of David’s mighty men (2 Samuel 23:39). Despite her marital status, David summoned Bathsheba to the palace, and they slept together.

Bathsheba later discovered she was pregnant (2 Samuel 11:5). When the king was told of this, he asked for Uriah to report back to him from the battlefield. David sent him home that evening, hoping Uriah would sleep with his wife and thus provide a cover for the pregnancy. Instead of obeying orders, Uriah slept in the quarters of the king’s servants, refusing to enjoy a respite while his men on the battlefield were still in harm’s way (2 Samuel 11:9–11). Uriah did the same thing the next night as well, showing integrity in sharp contrast to David’s lack thereof.

David then commanded his military leader, Joab, to have Uriah placed on the front lines of battle and then to purposefully fall back from him, leaving Uriah exposed to enemy attack. Joab followed the directive, and Uriah was killed in battle. After her time of mourning, Bathsheba married David and gave birth to a son. “But,” 2 Samuel 11:27 notes, “the thing David had done displeased the LORD.”

When the child was born, the Lord sent the prophet Nathan to confront David. Nathan used a parable: a rich man took a poor man’s only sheep and killed it, even though he had many flocks of his own. David, a former shepherd, was so angered by this story, which he thought was true, that he responded, “As surely as the Lord lives, the man who did this must die! He must pay for that lamb four times over, because he did such a thing and had no pity” (2 Samuel 12:5–6).

Nathan then pointed to David and uttered the chilling words, “You are the man!” (2 Samuel 12:7). David was the one guilty of this sin, and judgment would be upon his house in the form of ongoing violence. David repented (see Psalm 51), and Nathan said, “The Lord has taken away your sin. You are not going to die. But because by doing this you have shown utter contempt for the Lord, the son born to you will die” (2 Samuel 12:13–14). The child did die a week later, and David’s household experienced further hardship in later years. In total, four of David’s sons suffered untimely deaths—the “four times over” judgment he had pronounced upon himself.

In this account we find many lessons. First, secret sin will be found out. Second, God will forgive anyone who repents. Third, sin’s consequences remain even when the sin is forgiven. Fourth, God can work even in difficult situations. In fact, Bathsheba’s next son, Solomon, became the heir to the throne. Even in bad situations, God has a plan that serves His sovereign purpose.