I gave you your master's house, and your master's wives into your bosom, and gave you the house of Israel and of Judah; and if that had been too little, I would have added as much more.
Why have you despised the word of the Lord, to do what is evil in his sight? You have struck down Uriah the Hittite with the sword, and have taken his wife to be your wife, and have killed him with the sword of the Ammonites.
Now therefore the sword shall never depart from your house, for you have despised me, and have taken the wife of Uriah the Hittite to be your wife.
Thus says the Lord: I will raise up trouble against you from within your own house; and I will take your wives before your eyes, and give them to your neighbor, and he shall lie with your wives in the sight of this very sun.
For you did it secretly; but I will do this thing before all Israel, and before the sun."
David said to Nathan, "I have sinned against the Lord." Nathan said to David, "Now the Lord has put away your sin; you shall not die.
Nevertheless, because by this deed you have utterly scorned the Lord, the child that is born to you shall die."
References for 2 Samuel 12:14
Then Nathan went to his house. The Lord struck the child that Uriah's wife bore to David, and it became very ill.
David therefore pleaded with God for the child; David fasted, and went in and lay all night on the ground.
The elders of his house stood beside him, urging him to rise from the ground; but he would not, nor did he eat food with them.
On the seventh day the child died. And the servants of David were afraid to tell him that the child was dead; for they said, "While the child was still alive, we spoke to him, and he did not listen to us; how then can we tell him the child is dead? He may do himself some harm."