2 Samuel 11:1-7

1 And it came to pass, after the year was expired, at the time when kings go forth to battle, that David sent Joab and his slaves with him and all Israel, and they destroyed the sons of Ammon and besieged Rabbah. But David tarried still at Jerusalem.
2 And it came to pass one evening, 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.
3 And David sent and enquired after the woman. And one said, Is not this Bathsheba, the daughter of Eliam, the wife of Uriah, the Hittite?
4 And David sent messengers and took her, and she came in unto him, and he lay with her. Then she purified herself from her uncleanness, and she returned unto her house.
5 And the woman conceived and sent and told David and said, I am with child.
6 Then David sent to Joab, saying, Send me Uriah the Hittite. And Joab sent Uriah to David.
7 And when Uriah had come unto him, David asked him how Joab was and how the people were and how the war prospered.