Saul soon learned that David was at Keilah. "Good!" he exclaimed. "We've got him now! God has handed him over to me, for he has trapped himself in a walled city!"
So Saul mobilized his entire army to march to Keilah and attack David and his men.
But David learned of Saul's plan and told Abiathar the priest to bring the ephod and ask the LORD what he should do.
And David prayed, "O LORD, God of Israel, I have heard that Saul is planning to come and destroy Keilah because I am here.
Will the men of Keilah surrender me to him? And will Saul actually come as I have heard? O LORD, God of Israel, please tell me." And the LORD said, "He will come."
References for 1 Samuel 23:11
Again David asked, "Will these men of Keilah really betray me and my men to Saul?" And the LORD replied, "Yes, they will betray you."
So David and his men -- about six hundred of them now -- left Keilah and began roaming the countryside. Word soon reached Saul that David had escaped, so he didn't go to Keilah after all.
David now stayed in the strongholds of the wilderness and in the hill country of Ziph. Saul hunted him day after day, but God didn't let him be found
One day near Horesh, David received the news that Saul was on the way to Ziph to search for him and kill him.
Jonathan went to find David and encouraged him to stay strong in his faith in God.
"Don't be afraid," Jonathan reassured him. "My father will never find you! You are going to be the king of Israel, and I will be next to you, as my father is well aware."
So the two of them renewed their covenant of friendship before the LORD. Then Jonathan returned home, while David stayed at Horesh.
But now the men of Ziph went to Saul in Gibeah and betrayed David to him. "We know where David is hiding," they said. "He is in the strongholds of Horesh on the hill of Hakilah, which is in the southern part of Jeshimon
Come down whenever you're ready, O king, and we will catch him and hand him over to you!"
"The LORD bless you," Saul said. "At last someone is concerned about me
Go and check again to be sure of where he is staying and who has seen him there, for I know that he is very crafty.
Discover his hiding places, and come back with a more definite report. Then I'll go with you. And if he is in the area at all, I'll track him down, even if I have to search every hiding place in Judah!"
So the men of Ziph returned home ahead of Saul. Meanwhile, David and his men had moved into the wilderness of Maon in the Arabah Valley south of Jeshimon.
When David heard that Saul and his men were searching for him, he went even farther into the wilderness to the great rock, and he remained there in the wilderness of Maon. But Saul kept after him.
He and David were now on opposite sides of a mountain. Just as Saul and his men began to close in on David and his men,
an urgent message reached Saul that the Philistines were raiding Israel again.
So Saul quit the chase and returned to fight the Philistines. Ever since that time, the place where David was camped has been called the Rock of Escape.
References for 1 Samuel 23:28
David then went to live in the strongholds of En-gedi.