Therefore David inquired of the Lord - In what way David made this inquiry we are not told, but it was probably by means of Abiathar; and therefore I think, with Houbigant that the sixth verse should be read immediately after the first. The adventure mentioned here was truly noble. Had not David loved his country, and been above all motives of private and personal revenge, he would have rejoiced in this invasion of Judah as producing a strong diversion in his favor, and embroiling his inveterate enemy. In most cases a man with David's wrongs would have joined with the enemies of his country, and avenged himself on the author of his adversities; but he thinks of nothing but succouring Keilah, and using his power and influence in behalf of his brethren! This is a rare instance of disinterested heroism.
The Lord said - Go and smite - He might now go with confidence, being assured of success. When God promises success, who need be afraid of the face of any enemy?
If Gad was with David at the forest of Hareth 1 Samuel 22:5, and there inquired for him of the Lord 1Samuel 23:2,1 Samuel 23:4, but did not accompany him to Keilah, and if Abiathar‘s flight occurred at the time of David‘s being at Keilah, we have an additional striking instance of God‘s watchful providential care of David in thus sending Abiathar to supply the place of Gad at so critical a moment.