14 And David stayed in strongholds in the wilderness, and remained in the mountains in the Wilderness of Ziph. Saul sought him every day, but God did not deliver him into his hand. 1 Samuel 23:14
David saves Keilah, and is betrayed: 23:1-29. When the Philistines raid an Israelite town, David and his men hurry to the rescue.
… David inquired of the Lord, saying, “Shall I go and attack these Philistines?” … 4 Then David inquired of the Lord once again. And the Lord answered him and said, “Arise, go down to Keilah. For I will deliver the Philistines into your hand.
9 When David knew that Saul plotted evil against him, he said to Abiathar the priest, “Bring the ephod here.” 10 Then David said, “O Lord God of Israel, Your servant has certainly heard that Saul seeks to come to Keilah to destroy the city for my sake. 11 Will the men of Keilah deliver me into his hand? Will Saul come down, as Your servant has heard? O Lord God of Israel, I pray, tell Your servant.” And the Lord said, “He will come down.”
Saul immediately raises his army to attack the town. Before he can arrive, David leaves the city. Jonathan comes to “help him find strength in God” (16). But David is betrayed by the Ziphites, who offer to lead the king to his young enemy. David’s emotions at this betrayal are shared in Psalm 54.
14 And David stayed in strongholds in the wilderness, and remained in the mountains in the Wilderness of Ziph. Saul sought him every day, but God did not deliver him into his hand 15 So David saw that Saul had come out to seek his life. And David was in the Wilderness of Ziph in a forest. 16 Then Jonathan, Saul’s son, arose and went to David in the woods and strengthened his hand in God. 17 And he said to him, “Do not fear, for the hand of Saul my father shall not find you. You shall be king over Israel, and I shall be next to you. Even my father Saul knows that.” 18 So the two of them made a covenant before the Lord. And David stayed in the woods, and Jonathan went to his own house.