1 Samuel 23:7-18
Now it was told Saul that David had come to Kei'lah. And Saul said, "God has given him into my hand; for he has shut himself in by entering a town that has gates and bars." And Saul summoned all the people to war, to go down to Kei'lah, to besiege David and his men.
David knew that Saul was plotting evil against him; and he said to Abi'athar the priest, "Bring the ephod here." Then said David, "O LORD, the God of Israel, thy servant has surely heard that Saul seeks to come to Kei'lah, to destroy the city on my account. Will the men of Kei'lah surrender me into his hand? Will Saul come down, as thy servant has heard? O LORD, the God of Israel, I beseech thee, tell thy servant." And the LORD said, "He will come down." Then said David, "Will the men of Kei'lah surrender me and my men into the hand of Saul?" And the LORD said, "They will surrender you."
Then David and his men, who were about six hundred, arose and departed from Kei'lah, and they went wherever they could go. When Saul was told that David had escaped from Kei'lah, he gave up the expedition. And David remained in the strongholds in the wilderness, in the hill country of the Wilderness of Ziph. And Saul sought him every day, but God did not give him into his hand. And David was afraid because Saul had come out to seek his life. David was in the Wilderness of Ziph at Horesh. And Jonathan, Saul's son, rose, and went to David at Horesh, and strengthened his hand in God. And he said to him, "Fear not; for the hand of Saul my father shall not find you; you shall be king over Israel, and I shall be next to you; Saul my father also knows this." And the two of them made a covenant before the LORD; David remained at Horesh, and Jonathan went home.