Read this passage and open each verse for the full verse feed and commentary tools.
8And when the Philistines heard that David was anointed king over all Israel, all the Philistines went up to seek David: and David heard of it, and went out against them. 9Now the Philistines had come and made a raid in the valley of Rephaim. 10And David inquired of God, saying, Shall I go up against the Philistines? and wilt thou deliver them into my hand? And Jehovah said unto him, Go up; for I will deliver them into thy hand. 11So they came up to Baal-perazim, and David smote them there; and David said, God hath broken mine enemies by my hand, like the breach of waters. Therefore they called the name of that place Baal-perazim. 12And they left their gods there; and David gave commandment, and they were burned with fire.
13And the Philistines yet again made a raid in the valley. 14And David inquired again of God; and God said unto him, Thou shalt not go up after them: turn away from them, and come upon them over against the mulberry-trees. 15And it shall be, when thou hearest the sound of marching in the tops of the mulberry-trees, that then thou shalt go out to battle; for God is gone out before thee to smite the host of the Philistines. 16And David did as God commanded him: and they smote the host of the Philistines from Gibeon even to Gezer.
1 Chronicles 14:8-16 (ASV)