2 Samuel 11:2-15

2 One day, late in the afternoon, David got up from his nap and went to the palace roof. As he walked around up there, he saw a woman taking a bath in her house. She was very beautiful.
3 So he sent a messenger to find out who she was, and learned that she was Bathsheba, the daughter of Eliam and the wife of Uriah the Hittite.
4 David sent messengers to get her; they brought her to him and he made love to her. (She had just finished her monthly ritual of purification.) Then she went back home.
5 Afterward she discovered that she was pregnant and sent a message to David to tell him.
6 David then sent a message to Joab: "Send me Uriah the Hittite." So Joab sent him to David.
7 When Uriah arrived, David asked him if Joab and the troops were well, and how the fighting was going.
8 Then he said to Uriah, "Go on home and rest a while." Uriah left, and David had a present sent to his home.
9 But Uriah did not go home; instead he slept at the palace gate with the king's guards.
10 When David heard that Uriah had not gone home, he asked him, "You have just returned after a long absence; why didn't you go home?"
11 Uriah answered, "The men of Israel and Judah are away in battle, and the Covenant Box is with them; my commander Joab and his officers are camping out in the open. How could I go home, eat and drink, and sleep with my wife? By all that's sacred, I swear that I could never do such a thing!"
12 So David said, "Then stay here the rest of the day, and tomorrow I'll send you back." So Uriah stayed in Jerusalem that day and the next.
13 David invited him to supper and got him drunk. But again that night Uriah did not go home; instead he slept on his blanket in the palace guardroom.
14 The next morning David wrote a letter to Joab and sent it by Uriah.
15 He wrote: "Put Uriah in the front line, where the fighting is heaviest, then retreat and let him be killed."