David fails in his attempt to hide his sin. He arranges for Uriah to die in battle. David marries Bathsheba, and they have a son.
2 Samuel 11:6–17, 26–27
6 And David sent to Joab, saying, Send me Uriah the Hittite. And Joab sent Uriah to David. 7 And when Uriah was come unto him, David demanded of him how Joab did, and how the people did, and how the war prospered. 8 And David said to Uriah, Go down to thy house, and wash thy feet. And Uriah departed out of the king’s house, and there followed him a mess of meat from the king. 9 But Uriah slept at the door of the king’s house with all the servants of his lord, and went not down to his house. 10 And when they had told David, saying, Uriah went not down unto his house, David said unto Uriah, Camest thou not from thy journey? why then didst thou not go down unto thine house? 11 And Uriah said unto David, The ark, and Israel, and Judah, abide in tents; and my lord Joab, and the servants of my lord, are encamped in the open fields; shall I then go into mine house, to eat and to drink, and to lie with my wife? as thou livest, and as thy soul liveth, I will not do this thing. 12 And David said to Uriah, Tarry here to day also, and to morrow I will let thee depart. So Uriah abode in Jerusalem that day, and the morrow. 13 And when David had called him, he did eat and drink before him; and he made him drunk: and at even he went out to lie on his bed with the servants of his lord, but went not down to his house. 14 And it came to pass in the morning, that David wrote a letter to Joab, and sent it by the hand of Uriah. 15 And he wrote in the letter, saying, Set ye Uriah in the forefront of the hottest battle, and retire ye from him, that he may be smitten, and die. 16 And it came to pass, when Joab observed the city, that he assigned Uriah unto a place where he knew that valiant men were. 17 And the men of the city went out, and fought with Joab: and there fell some of the people of the servants of David; and Uriah the Hittite died also. . . . 26 And when the wife of Uriah heard that Uriah her husband was dead, she mourned for her husband. 27 And when the mourning was past, David sent and fetched her to his house, and she became his wife, and bare him a son. But the thing that David had done displeased the Lord.
Elder L. Whitney Clayton said:
“There’s an account in the Old Testament about someone who fell prey to a . . . trap. That man was mighty King David, and what happened is one of the saddest stories in the scriptures.
“‘And it came to pass . . . at the time when kings go forth to battle, that David sent Joab, and his servants with him, and all Israel; and they [fought against Ammon]. But David tarried still at Jerusalem.
“‘And it came to pass in an evening-tide, that David arose from off his bed, and walked upon the roof of the king’s house: and from the roof he saw a woman washing herself; and the woman was very beautiful to look upon’ (2 Samuel 11:1–2).
“David learned the woman’s name was Bathsheba. Her husband, Uriah, a soldier, was away fighting the Ammonites with the rest of the army, where David, their king, should have been. David had Bathsheba brought to the palace. They committed adultery, she became pregnant, and David began to fear that their adultery would be discovered. Hoping to cover his sin, David ordered that Uriah be sent back to Jerusalem. Uriah returned, but refused on principle to go to his home to visit Bathsheba. David then arranged for Uriah to be slain in battle (see 2 Samuel 11:3–17). This series of dreadful decisions brought death to Uriah and misery to David, Bathsheba, and eventually the entire kingdom. With rich understatement, the Bible says, ‘The thing that David had done displeased the Lord’ (2 Samuel 11:27).
“Do you see how David got caught in this trap? He was on a rooftop courtyard of his palace, and looking below in a neighboring yard, he saw something he never should have seen. That was the adversary’s bait. Modesty, chastity, and good judgment required that David turn away immediately and not watch, but he didn’t do either thing. Instead, he allowed his mind to turn to forbidden fantasies, those thoughts led to actions, and things quickly spiraled downward from bad to worse to fatal. David was trapped, and for him the consequences were eternal.
“There’s a spiritual snare today called pornography, and many, allured by its provocative messages, enter this deadly trap. Like any trap, it is easy to enter but difficult to escape. Some rationalize that they can casually view pornography without suffering its adverse effects. They say initially, ‘This isn’t so bad,’ or, ‘Who cares? It won’t make any difference,’ or, ‘I’m just curious.’ But they are mistaken. The Lord has warned, ‘And he that looketh upon a woman to lust after her shall deny the faith, and shall not have the Spirit; and if he repents not he shall be cast out’ (D&C 42:23). That’s exactly what happened to David: he looked at Bathsheba, lusted after her, and lost the Spirit. How different the rest of David’s life might have been if he had just looked away.”
(“Blessed Are All the Pure in Heart,” Ensign or Liahona, Nov. 2007, 51–52.)