2 Samuel 11:4-5

11:4 David sent some messengers to get her. She came to him and he had sexual relations with her. (Now at that time she was in the process of purifying herself from her menstrual uncleanness.) Then she returned to her home. 11:5 The woman conceived and then sent word to David saying, “I’m pregnant.”

2 Samuel 11:27

11:27 When the time of mourning passed, David had her brought to his palace. She became his wife and she bore him a son. But what David had done upset the Lord.