1 Chronicles 14:10-11

14:10 David asked God, “Should I march up against the Philistines? Will you hand them over to me?” The Lord said to him, “March up! I will hand them over to you!” 14:11 So they marched against Baal Perazim and David defeated them there. David said, “Using me as his instrument, God has burst out against my enemies like water bursts out.” So that place is called Baal Perazim.

1 Chronicles 14:14-16

14:14 So David again asked God what he should do. This time God told him, “Don’t march up after them; circle around them and come against them in front of the trees. 14:15 When you hear the sound of marching in the tops of the trees, then attack. For at that moment the Lord is going before you to strike down the army of the Philistines.” 14:16 David did just as God commanded him, and they struck down the Philistine army from Gibeon to Gezer.