Returning from battle with the Philistines, Saul heads to Ein Gedi in pursuit of David and enters the cave where, as it happens, David and his supporters are hiding, "to attend to his needs".
Early Christians interpreted the life of Jesus in light of the references to the Messiah and to David; Jesus is described as being descended from David.
As king, David arranges the death of Uriah the Hittite to cover his adultery with Bathsheba.
According to the same biblical text, God denies David the opportunity to build the temple and his son, Absalom, tries to overthrow him.
In this account (1 Samuel 26), David is advised by Abishai that this is his opportunity to kill Saul, but David declines, saying he will not "stretch out [his] hand against the Lord’s anointed".
David shows, by removing Saul's spear, that he had chance to take Saul's life but did not do so.