According to the biblical narrative in the first Book of Samuel, David rescued it from the attack of the Philistines (1 Samuel 23:1-8), but he discerned in prayer that the inhabitants would prove unfaithful to him, in that they had offered to deliver him up to King Saul (1 Samuel 23:10-12). He and his 600 men "departed from Keilah, and went whithersoever they could go”. They fled to the woods in the wilderness of Ziph. "And David was in the wilderness of Ziph, in a wood" (1 Samuel 23:15). Here his friend Jonathan sought him out, "and strengthened his hand in God": this was the last meeting between David and Jonathan (1 Samuel 23:16-18).
Benjamin of Tudela identified Kâkôn (Qaqun) as ancient Keilah in 1160. Others believe it to be modern Qila, 11 km (7 mi) northwest of Hebron. Still others identify it with Khuweilfeh, between Beit Jibrin (Eleutheropolis) and Beersheba, mentioned in the Amarna tablets.