2 Samuel 12
The prophet Nathan was sent by the Lord to rebuke David for his wicked behavior ( adultery and murder). Nathan told David a story about an evil rich man who stole from a poor man. When David became upset and suggested that the rich man should be put to death, Nathan told David that he had behaved just like the rich man in the story when he took the wife of Uriah to be his own and murdered Uriah. Then Nathan told David that the Lord has taken away his sin, but " because by doing this David has made the enemies of the Lord show utter contempt, the son born to David will die." David pleaded with God for the child's life, but on the seventh day his son died just as the Lord had said. Then David comforted his wife, Bathsheba, who later had another son and they named him Solomon.