18 Meanwhile the Philistines had come and deployed themselves in the valley of Rephaim.
19 David inquired of the Lord, “Shall I attack the Philistines, and will you deliver them into my power?” The Lord answered David: Attack, for I will surely deliver the Philistines into your power.
20 So David went to Baal-perazim, and he defeated them there. He said, “The Lord has broken through my enemies before me just as water breaks through a dam.” Therefore that place was called Baal-perazim.
21 The Philistines abandoned their gods there, and David and his men carried them away.
22 Once again the Philistines came up and deployed themselves in the valley of Rephaim,
23 and again David inquired of the Lord, who replied: Do not attack the front—circle behind them and come against them near the balsam trees.
24 When you hear the sound of marching in the tops of the balsam trees, act decisively, for then the Lord has already gone before you to strike the army of the Philistines.