1 Samuel 23:10
Then said David, O LORD God of Israel, thy servant hath certainly heard that Saul seeketh to come to Keilah, to destroy the city for my sake. Then said David, O LORD God of Israel, thy servant hath certainly heard that Saul seeketh to come to Keilah, to destroy the city for my sake.
Before this prayer David and his band had rescued Keilah from the Philistines. In the verse David reports what he has certainly heard, that Saul is seeking to come to Keilah to destroy the city for his sake, so Saul's pursuit of David has put Keilah itself in danger. Keilah was therefore no place of safety for David and his men, and they left it for the wilderness of Ziph.