David (meaning favorite) was an important King of Israel. He is described in the Qu'ran, Bahá'í scripture and the Old Testament books of 1 Samuel and 2 Samuel. He was the father of King Solomon, and an ancestor of Jesus.

Early years
David was the youngest of the eight sons of Jesse, a shepherd; Jesse was the son of Ruth (Ruth 4: 17, 22). David was a shepherd, like his father. While taking care of the sheep, he would use a sling to keep wild animals from hurting them. He would also play his harp. Many of the songs he wrote during his life are found in the book of Psalms.

In Saul's service
When Saul, the first King of Israel, left the Lord, God sent an evil spirit in him to torment him.
He called David, the shepherd, to his palace because David was good at playing the harp, and the soft music soothed Saul when he was being tormented by the evil sprit. Saul "liked him very much, and David became one of his armor-bearers." So, "...whenever the spirit from God came upon Saul, David would take his harp and play. Then relief would come to Saul; he would feel better, and the evil spirit would leave him."  He unknowingly puts in his court the person God chose to replace him.

David’s first victory

When David was about twelve years old, his older brothers had to join the army to fight for Israel, under the leadership of King Saul. His father was worried about them, and sent David to check on them.  He took his harp with him, and King Saul, who was very troubled, heard him play and found it soothing. He asked for David to remain with the army.

At the time David arrived, a giant Philistine enemy, Goliath, was mocking the Israelites and God, saying, “Who will come and fight me? If he wins, we will be your slaves, but if I win, then you will be our slaves!” All the Israelites were afraid. When David saw this, he was very angry, and he said, “I will go and fight him!”

David's faith was very different from that of King Saul, who, not thinking about God, immediately said, "You are not able...you are only a boy..." But David said confidently, "The Lord who delivered me from the paw of the lion and the paw of the bear will deliver (save) me from the hand of this Philistine." He had faith, not in his own fighting skills, but in the power of God, whose honor has been hurt by the Philistines and whose covenant promises had been forgotten by the Israelites.

When King Saul saw that David was brave enough to fight Goliath, he agreed to send him. Saul gave David armour and weapons, but they were too heavy for him. David told Saul that he would use his sling instead. He then used a smooth stone and hit Goliath in the forehead, killing him instantly. Using Goliath’s own sword, David cut off Goliath's head. Although Saul was pleased at the victory, he began to worry that David would begin to seek power.

Jealousy erupts
Later, because of David's excellent fighting skills and loyalty to God, King Saul appointed David to a high rank in the army and married him to one of his own daughters, Michal. Whenever David went into battle, he returned with a victory, and all the people were pleased with him, and King Saul treasured him very much. David became a close companion and friend of Saul's son Jonathan. But one day, when King Saul was coming out to greet his people, the women of the town came out, singing and dancing, with tambourines and lutes. And as they danced, they sang the following words:
"Saul has slain his thousands,
and David his tens of thousands."
Saul, hearing this song, was seized with fury and jealousy, and began to suspect that the people liked David more than him.

Saul tries to kill David
Saul's jealousy then began to heat into hatred, and he wanted to kill David, but not yet with his own hand - and so he asked David to marry his daughter, Merab, but David refused politely, and Merab was married to Adriel of Meholah. Then he asked, again, for David to marry Michal, who was in love with David. David again refused. Finally, he asked him to bring a hundred Philistine foreskins, and then he would give the bride over. David was pleased to become Saul's son-in-law when he heard this, and agreed. Saul thought, "Now he will be killed by the Philistine's hand!" But God was with David, and he was not hurt. Saul tells Jonathan and all the officials to kill David, but Jonathan loved David very much (and had made a covenant of friendship with him), and warned Saul not to. Saul listened, but later he grew angry again, and kept trying to kill David. Many times David did not kill Saul when he had a chance to, but instead said, "How can I kill the Lord's anointed?" and spared Saul; and many times Saul blessed David and repented, and determined to stop trying to kill David - but he always returned with a spear.

David crowned king

In battle with the Philistines, Saul's sons Jonathan, Abinadab and Malki-Shua were killed (the surviving son, Ish-Bosheth or Esh-Baal, was later made king by Abner). Saul was injured, and he said to his armor-bearer to kill him before "...these uncircumcised fellows will come and run me through and abuse me."  The armor-bearer was too afraid to do it, so Saul "...took his own sword and fell on it", killing himself. The armor-bearer killed himself, as well. "So Saul and his three sons and his armor-bearer and all his men died together that same day." 

An Amalekite came to David and lied that he had killed Saul, probably hoping that David would reward him. David realized that Saul was dead, and ripped his clothes and wept. He was not happy to hear that Saul was dead, and even killed the Amalekite, thinking that he was Saul's murderer. He was anointed again in front of everybody.

Meanwhile, Ish-Bosheth, the only son of Saul left, was made king by Abner, a relative of Saul. "The war between the house of Saul and the house of David lasted a long time. David grew stronger and stronger, while the house of Saul grew weaker and weaker.", Later, Abner slept with one of Saul's concubines, and Ish-Bosheth asked, "Why did you sleep with my father's concubine?" Ish-Bosheth suspected that Abner wanted to be king instead of him (sleeping with the concubine of a king was thought very important). Abner became very angry and decided to help David instead. However, Joab, the commander of David's army, did not like Abner because Abner had killed his brother. Maybe he also thought his job as the leader of the army would not be safe if Abner helped David, because Abner was very powerful in the northern tribes of Israel. So, Joab killed him by stabbing him in the stomach. David cursed Joab for murdering Abner and said that he did not join in the killing.

When Ish-Bosheth heard that Abner had died, he became very worried: the northern tribes were now without a strong leader. Two men, Recab and his brother Baanah, killed Ish-Bosheth in his house and brought his head to David, saying, "This day the LORD has avenged my lord the king against Saul." David was very angry, and killed them: cutting off the hands that had killed Ish-Bosheth and the feet that had run with the news. They buried the head of Ish-Bosheth in Abner's tomb.

All the tribes of Israel then came to David and made him king over Israel.

A promise not forgotten

A few years after David had captured Jerusalem, he asked, "Is there anyone...to whom I can show kindness for Jonathan's sake?" remembering the promise he had made. They found a servant of King Saul named Ziba, who said that there was still a son of Jonathan who was crippled in both feet named Mephibosheth. David told Mephibosheth that he would get back all the land Saul had when he was king, and that Mephibosheth would always eat at his table - a mark of great honor. Mephibosheth bowed down and cried, "What is your servant, that you should notice a dead dog like me?"  From then on, Mephibosheth lived in Jerusalem and always ate at the king's table like one of David's sons.

David and Bathsheba

One day, David was walking around on the roof of his palace when he saw a very beautiful woman bathing. David found out that her name was Bathsheba, the daughter of Eliam and the wife of Uriah the Hittite, who was one of David's royal guards. David "sent messengers to get her...and he slept with her."  Because of this, David eventually broke the sixth, seventh, ninth and tenth commandments  She soon became pregnant. The law said that both David and Bathsheba must die for their sin. David made Uriah come back from battle and tried to make him go back home and sleep with Bathsheba, so everybody would think it was Uriah's son. But Uriah did not go home, saying, "The ark and Israel and Judah are staying in tents...How could I go to my house...and lie with my wife?"  His devotion demonstrated how sinful David was. Finally, when David could not make him go home, he decided to make Uriah die so he could marry Bathsheba himself quickly. He said, "Put Uriah in the front line where the fighting is fiercest (most violent).  Then withdraw (go away) from him so he will be struck down and die."  Because of this, Uriah died.

David married Bathsheba, but "...the thing David had done displeased the LORD." So, Nathan the prophet went and told him that he had done a very bad sin. David saw he was guilty and was very sorry. He said, "I have sinned against the Lord."  Nathan told David that he was forgiven, and the LORD mercifully did not make David die, as the law said he must. However, Nathan said that Bathsheba's first son, born as a result of their sins would die. After Nathan had gone home, the child became sick and died. David was very sad, but humbly accepted the results of his sin. Bathsheba had another son, and they named him Solomon. The LORD loved him, and said to name him Jedidah (it means loved by the LORD)  This name showed that the LORD loved Solomon from when he was born, and also showed that the LORD still loved David, even though he had sinned.

Descendants
After the overthrow of King Zedekiah of the House of David his lineage was carried on by the Exilarchs.Descendants of the house of exilarchs were living in various places long after the office became extinct. A descendant of Hezekiah, Hiyya al-Daudi, Gaon of Andalucia, died in 1154 in Castile according to Abraham ibn Daud. Several families, as late as the 14th century, traced their descent back to Josiah, the brother of David ben Zakkai who had been banished to Chorasan (see the genealogies in [Lazarus 1890] pp. 180 et seq.). The descendants of the Karaite Exilarchs have been referred to above.A number of Jewish families in the Iberian peninsula and within Mesopotamia continued to preserve the tradition of descent from Exilarchs in the Late Middle Ages, including the families of Abravanel, Benveniste, Hajj Yachya and Ben-David. One tradition also traces the ancestry of Judah Loew ben Bezalel to Babylonian Exilarchs (during the era of the geonim) and therefore also from the Davidic dynasty, which is however disputed. According to another tradition, Rabbi Elazar Rokeach of Amsterdam of the Belz (Hasidic dynasty) was a descendent from the house of King David. Another Rabbanic Dynasty Charlap also are reportably from the House of King David.

Cultural references
Leonard Cohen's song "Hallelujah" has references to David ("there was a secret chord that David played and it pleased the Lord", "The baffled king composing Hallelujah") and Bathsheba ("you saw her bathing on the roof") in its opening verses.

References

Old Testament people
Kings of ancient Israel
Kings of ancient Judah
People from Bethlehem