David inquired of the Lord, and did as the Lord commanded him. Following this, the Lord went out before David to strike down the army of the Philistines(cf. 2 Samuel 5:1-10).