2 Samuel 5:17-25 NLT
When the Philistines heard that David had been anointed king of Israel, they mobilized all their forces to capture him. But David was told they were coming, so he went into the stronghold. The Philistines arrived and spread out across the valley of Rephaim. So David asked the LORD, “Should I go out to fight the Philistines? Will you hand them over to me?”
The LORD replied to David, “Yes, go ahead. I will certainly hand them over to you.”
So David went to Baal-perazim and defeated the Philistines there. “The LORD did it!” David exclaimed. “He burst through my enemies like a raging flood!” So he named that place Baal-perazim (which means “the Lord who bursts through”). The Philistines had abandoned their idols there, so David and his men confiscated them.
But after a while the Philistines returned and again spread out across the valley of Rephaim. And again David asked the LORD what to do. “Do not attack them straight on,” the LORD replied. “Instead, circle around behind and attack them near the poplar trees. When you hear a sound like marching feet in the tops of the poplar trees, be on the alert! That will be the signal that the LORD is moving ahead of you to strike down the Philistine army.” So David did what the LORD commanded, and he struck down the Philistines all the way from Gibeon to Gezer.
NLT: New Living Translation