Read this passage and open each verse for the full verse feed and commentary tools.
8When the Philistines heard that David had been anointed king over all Israel, all the Philistines went up in search of David; and David heard of it and went out against them. 9Now the Philistines had come and made a raid in the valley of Reph'aim. 10And David inquired of God, "Shall I go up against the Philistines? Wilt thou give them into my hand?" And the LORD said to him, "Go up, and I will give them into your hand." 11And he went up to Ba'al-pera'zim, and David defeated them there; and David said, "God has broken through my enemies by my hand, like a bursting flood." Therefore the name of that place is called Ba'al-pera'zim. 12And they left their gods there, and David gave command, and they were burned.
13And the Philistines yet again made a raid in the valley. 14And when David again inquired of God, God said to him, "You shall not go up after them; go around and come upon them opposite the balsam trees. 15And when you hear the sound of marching in the tops of the balsam trees, then go out to battle; for God has gone out before you to smite the army of the Philistines." 16And David did as God commanded him, and they smote the Philistine army from Gibeon to Gezer.
1 Chronicles 14:8-16 (RSV)