David is described in the Hebrew Bible as the third king of the united monarchy of Israel and Judah, after Ish-bosheth. In the biblical narrative, David is a young shepherd who gains fame first as a musician and later by killing the enemy champion Goliath. He becomes a favorite of King Saul and a close friend of Saul's son Jonathan. Worried that David is trying to take his throne, Saul turns on David. After Saul and Jonathan are killed in battle, David is anointed as King. David conquers Jerusalem, taking the Ark of the Covenant into the city, and establishing the kingdom founded by Saul. As king, David commits adultery with Bathsheba, leading him to arrange the death of her husband Uriah the Hittite. Because of this sin, God denies David the opportunity to build the temple, and his son Absalom tries to overthrow him. David flees Jerusalem during Absalom's rebellion, but after Absalom's death he returns to the city to rule Israel. Before his peaceful death, he chooses his son Solomon as successor. He is honored in the prophetic literature as an ideal king and the forefather of a future Messiah, and many psalms are ascribed to him.