Therefore David inquired of Yahweh, saying, Shall I go and strike these Philistines? Yahweh said to David, Go, and strike the Philistines, and save Keilah.
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 men 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 (1 Samuel 23:5), but clearly it was God who enabled him to win against such a daunting foe (1 Samuel 23:4).