Now when David was told, "The philistines are fighting against Keilah and are robbing the threshing-floors," he inquired of the LORD, "Shall I go and attack these Philistines?" the LORD said to David, "Go, attack the Philistines and save Keilah." But David's men said to him, "See, we are afraid here in Judah; how much more will we be if we go to Keilah against the armies of the Philistines?" When David again inquired of the LORD, the LORD answered him, "Arise, go down to Keilah, for I will give the Philistines into your hand." So David and his men went to Keilah and fought with the Philistines and drove away their cattle and killed a great many of them. In this way David delivered the people of Keilah.
Now when Abiathar, the son of Ahimelech, fled to David in Keilah, he came down with the priestly robe used in consulting the LORD in his hand. And when Saul was told that David had come to Keilah, Saul said, "God has given him into my power, for by entering a town that has doors and bars he has let himself be trapped."
So Saul called all the people to arms to go down to Keilah to besiege David and his men. But when David knew that Saul was plotting evil against him, he said to Abiathar the priest, "Bring here the priestly robe." Then David said, "O the LORD, the God of Israel, thy servant has surely heard that Saul is planning to come to Keilah, to destroy the town because of me. Will Saul come down, as thy servant has heard? O the LORD, God of Israel, tell thy servant." the LORD said, "He will come down." Then David said, "Will the men of Keilah turn me and my men over to Saul?" the LORD said, "They will." Then David and his men, who were about six hundred, left Keilah, and wandered from one place to another. When it was reported to Saul that David had escaped from Keilah, he no longer followed him. So David lived in the Wilderness of Ziph and stayed in the mountain strongholds.
Then the Ziphites came to Saul at Gibeah, saying, "Is not David hiding in the hill country of Hachilah?" So Saul went down to the Wilderness of Ziph with three thousand men of Israel to hunt for David. And Saul camped in the hill country of Hachilah; but David stayed in the wilderness. When David saw that Saul was following him into the wilderness, he sent out scouts and learned that Saul had come to the place just in front of him. David then arose and went to the place where Saul had camped. And he saw the place where Saul lay, with Abner the son of Ner, the commander of his army; and Saul was within the barricade, and the people were camped about him.
Then David turned to Ahimelech the hittite and to Abishai the son of Zeruiah, Joab's brother, and said, "Who will go down with me to Saul's camp?" Abishai said, "I will go with you." So David and Abishai came to the people by night, and Saul was lying asleep inside the barricade, with his spear stuck into the earth at his head and with Abner and the soldiers lying about him.
Then Abishai said to David, "God has given your enemy to you to-day. Now let me pin him to the earth with his spear at one stroke, for I will not need to strike him twice!" David replied, "As surely as the LORD lives, either the LORD will smite him, or his day will come to die, or he will go down into battle and meet his end. the LORD forbid that I should harm him whom the LORD has called to rule! But now take the spear that is at his head and the jug of water, and let us go." So David took the spear and the jug of water from Saul's head, and they departed. But no man saw it or knew it, for they were all asleep, and no one awoke, for a deep sleep from the LORD had fallen upon them.
Then David went across and stood on the top of a hill at a distance with a great space between them. And David called to the soldiers and to Abner, the son of Ner, and said, "Do you make no answer, Abner?" Abner answered, "Who are you that calls?" David said to Abner, "Are you not a man, and who is like you in Israel? Why then have you not kept guard over your lord the ruler of Israel? For one of the people came to destroy your lord. You have not done what is right. As surely as the LORD lives you ought to be put to death, for you have not kept watch over your master whom the LORD has called to rule. Now see where his spear is and his jug of water that was at his head."
Saul knew David's voice and said, "Is this your voice, my son David?" David replied, "It is my voice, my lord." And he added, "Why is it that my lord is following his servant? For what have I done? Or of what am I guilty? Now therefore let my lord listen to me. If the LORD has stirred you up against me, let him accept an offering. But if men have stirred you up against me, let them be cursed before the LORD, for they have driven me out to-day, saying, 'Go serve other gods,' so that I have no share in the land which the LORD has given to his people. May I not meet my end far away from the presence of the LORD, for the ruler of Israel has come out to seek my life, as one hunts a partridge on the mountains."
Then Saul said, "I have done wrong. Come back, my son David, for I will do you no more harm, for you have spared my life to-day. I have acted foolishly and have made a great mistake." David answered, "Here is Saul's spear! Let one of the young men come over and take it. May the LORD reward each one who does right and is faithful; for the LORD gave you to me to-day, but I would not harm one whom the LORD had called to rule. Just as your life was of great value in my sight so may my life be of great value in the LORD's sight, and may he deliver me from all trouble."
Then Saul said to David, "May you be blessed, my son David! You shall do great deeds and shall surely succeed!" So David went his way, but Saul returned home.