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.
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.
Afterward she discovered that she was pregnant and sent a message to David to tell him.
David then sent a message to Joab: "Send me Uriah the Hittite." So Joab sent him to David.
When Uriah arrived, David asked him if Joab and the troops were well, and how the fighting was going.
Then he said to Uriah, "Go on home and rest a while." Uriah left, and David had a present sent to his home.
But Uriah did not go home; instead he slept at the palace gate with the king's guards.
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?"
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!"
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.
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.