King Saul was so distracted by his hatred for David that he neglected his duties as King, leaving Israel ill prepared to face the Philistine invasion. Saul and his sons perished in battle, finally ending the era of Saul.
David joins the Philistines forces that are mustering to battle King Saul but is sent home, his loyalties being questionable. Upon their return to Ziklag they find their families stolen by Amalekites, give chase and prevail.
David is still amongst the Philistines as they gather for war against King Saul. This war brought dread to Saul and in desperation for spiritual help, he goes to a witch for a séance. There he is told God is his enemy.
David gave up on God delivering him from Saul as long as he remained in Saul’s territory. So he fled to a less hostile enemy, to ally himself there (in appearance), secretly raiding other enemies of Israel to survive.
Again King Saul is told where David hides, again bringing troops to find and kill David. Again David finds himself in position to slay Saul but does not. David will not touch God’s anointed, instead he admonish them.