David went to rescue the people of Keilah from the Philistines, but then he had to flee from that town because the citizens were going to hand him over to Saul.
Keilah was about three miles southeast of Adullam in the Shephelah, the foothills between the coastal plain on the west and the hill country of Judah on the east. The Philistines were plundering the threshing floors there. The threshing floors where places where the Israelites stored their threshed grain after threshing it (cf. 2 Kings 6:27; Joel 3:24). David sought to defend his countrymen and fellow Judahites from their hostile foreign enemy even though he was having to watch out for Saul. Saul should have come to their rescue since he was the king, but there is no mention of him doing so.
The writer recorded in this passage that David inquired of the Lord four times (vv. 2, 4, 10, 11). He placed himself under God's authority, though Saul did not. For this reason God could and did work through David as His vice-regent. God manifested His will through the Urim and Thummim in the priestly ephod (vv. 6, 9; cf. Exod. 28:28).235Evidently Abiathar interpreted the will of God for David.
David was not just defending himself during this period of his life. He was aggressively carrying out the will of God by defeating Israel's enemies as the Lord's anointed servant. God told David to go against the Philistines first. Then in response to David's second prayer, He promised that He (emphatic in the Hebrew text) would give the Philistines into David's hand. David's 600 men (v. 13) were understandably afraid to attack the Philistines who had greater numbers and stronger forces. Nevertheless David attacked and soundly defeated the Philistines because of God's promise and power. The writer gave credit to David for the victory (v. 5), but clearly it was God who enabled him to win against such a daunting foe (v. 4).
Abiathar had evidently remained in the forest of Hereth when David took his men to attack the Philistines in Keilah (cf. 22:20-23). Now the priest joined David at Keilah (v. 6). The presence of the ephod made it possible for David to continue to obtain guidance from the Lord in answer to his prayers.
Saul piously claimed that God had delivered David into his hands (v. 7). Obviously God had not done this since David was the Lord's anointed, and it was not His will that Saul should hunt him down, much less kill him. Keilah evidently had only one gate by which people could enter and exit the town. Saul felt confident that he could control the gate and so trap David.
Saul summoned soldiers to accompany him to Keilah (v. 7), but there is no mention that he prayed for divine guidance as David had done (vv. 2, 4). David prayed again and requested answers to two questions (vv. 10-11). He opened and closed his prayer with an appeal to the "LORD God of Israel,"the ultimate ruler of His people. He also described himself as the Lord's "servant"twice. David voiced concern for his men (v. 12) as well as for himself (v. 11). God gave the answer to David's second question first, and then He answered his first question.
The willingness of the people of Keilah to hand their savior over to Saul demonstrates base ingratitude for David's deliverance of them. It also reveals how fearful they were of Saul who had recently destroyed another town, Nob, for harboring David (22:19).
David left Keilah after he learned that he was vulnerable if he stayed there (v. 13). He did not take revenge on the citizens of Keilah for telling Saul where he was. Saul had taken revenge on the citizens of Nob for not telling him where David was. The number of David's supporters had grown from 400 (22:2) to 600. More people were siding with David and were turning from Saul. Saul abandoned his plans to attack Keilah, and David moved on to the wilderness near Ziph.