1 Samuel 23:2
Therefore David enquired of the LORD, saying, Shall I go and smite these Philistines? And the LORD said unto David, Go, and smite the Philistines, and save Keilah.
Therefore David inquired of the Lord, saying, shall I go and smite these Philistines?.... For though David was well disposed to serve his country, and was desirous of freeing them from their enemies the Philistines, he might have some doubts in his mind whether it would be right for him to engage with them now; partly because he could not act under a commission from his prince, Saul the king; and partly because he had such a small number of forces with him, that it might be hazardous for him to attack the armies of the Philistines with them, and attempt to raise the siege of Keilah; and therefore he thought it advisable, as doubtless it was, to inquire of the Lord what was his mind and will in this matter: how and by what means he inquired it is not said, very probably it was by the prophet Gad, who was with him, 1 Samuel 22:5; for as for Abiathar, he was not yet come with the ephod, the Urim and Thummim, to inquire by them, 1 Samuel 23:6; though some think that is observed there to show in what way David did inquire, namely, by Urim and Thummim; and so Kimchi and Abarbinel understand it; and it is supposed that he came to David when he was about Keilah, and near unto it, and so before he came thither, and time enough for him to inquire by him whether he should go thither or not:
And the LORD said unto David, Go, and smite the Philistines, and save Keilah; which was not only giving him leave to go, and signifying it was his mind and will he should; but that he should be successful, and rout the Philistines, and raise the siege of Keilah, and save the city from falling into their hands.