Nathan comes to David and tells him a parable. In a town, there is a rich man and a poor man. The rich man has much livestock, but the poor man has only one lamb whom he loves like a child. One day, the rich man has a guest, and instead of slaughtering one of his own livestock, demands the poor man’s lamb.
David insists the rich man be put to death, but Nathan tells him he is the man, saying he has committed a sin to get something he already had plenty of (wives), and prophecies that his family will be gripped by violence, and someone will have affairs with his wives publicly. David repents, and Nathan tells him that while he is forgiven and will not die, his son with Bathsheba will.
The child becomes ill, and David spends his time fasting and praying, but to no avail, because the child dies. David’s attendants are scared to tell him the news, worried about what he may do. However, he surprises everyone by ending his fasting, saying that he was fasting and praying was an attempt to persuade God to save his child, whereas fasting now isn’t going to bring the child back.
After they have mourned, David and Bathsheba have another child, who they name Solomon (also called Jedediah).