1 Samuel 23:1-14 NIV
When David was told, “Look, the Philistines are fighting against Keilah and are looting the threshing floors,” he inquired of the LORD, saying, “Shall I go and attack these Philistines?”
The LORD answered him, “Go, attack the Philistines and save Keilah.”
But David’s men said to him, “Here in Judah we are afraid. How much more, then, if we go to Keilah against the Philistine forces!”
Once again David inquired of the LORD, and the LORD answered him, “Go down to Keilah, for I am going to give the Philistines into your hand.” So David and his men went to Keilah, fought the Philistines and carried off their livestock. He inflicted heavy losses on the Philistines and saved the people of Keilah. (Now Abiathar son of Ahimelek had brought the ephod down with him when he fled to David at Keilah.)
Saul was told that David had gone to Keilah, and he said, “God has delivered him into my hands, for David has imprisoned himself by entering a town with gates and bars.” And Saul called up all his forces for battle, to go down to Keilah to besiege David and his men.
When David learned that Saul was plotting against him, he said to Abiathar the priest, “Bring the ephod.” David said, “LORD, God of Israel, your servant has heard definitely that Saul plans to come to Keilah and destroy the town on account of me. Will the citizens of Keilah surrender me to him? Will Saul come down, as your servant has heard? LORD, God of Israel, tell your servant.”
And the LORD said, “He will.”
Again David asked, “Will the citizens of Keilah surrender me and my men to Saul?”
And the LORD said, “They will.”
So David and his men, about six hundred in number, left Keilah and kept moving from place to place. When Saul was told that David had escaped from Keilah, he did not go there.
David stayed in the wilderness strongholds and in the hills of the Desert of Ziph. Day after day Saul searched for him, but God did not give David into his hands.
NIV: New International Version