18 The Philistines arrived and spread out over the Rephaim Valley.
19 David asked the Lord, "Should I attack the Philistines? Will you hand them over to me?""Attack them," the Lord replied, "because I will definitely hand the Philistines over to you."
20 So David arrived at Baal-perazim and defeated the Philistines there. He said, "The Lord has burst out against my enemies, the way water bursts out!" That is why that place is called Baal-perazim.
21 The Philistines left their divine images behind, and David and his men carried them off.
22 Once again the Philistines came up and spread out across the Rephaim Valley.
23 When David asked the Lord, God replied, "Don’t attack them directly. Circle around behind them and come at them from in front of the balsam trees.
24 As soon as you hear the sound of marching in the tops of the trees, then attack, for God has attacked in front of you to defeat the Philistine army."