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.
9And the Philistines came and spread themselves in the valley of Rephaim.
10And David inquired of God, saying, Shall I go up against the Philistines? and will you deliver them into my hand? And the LORD said unto him,
Go up; for I will deliver them into your hand.
11So they came up to Baal-perazim; and David defeated them there. Then David said, God has broken in upon my enemies by my hand like the breaking forth of waters: therefore they called the name of that place Baal-perazim.
12And when they had left their gods there, David gave a commandment, and they were burned with fire.
13And the Philistines yet again spread themselves abroad in the valley.
14Therefore David inquired again of God; and God said unto him,
Go not up after them; turn away from them, and come upon them opposite the balsam trees.
15And it shall be, when you shall hear a sound of marching in the tops of the balsam trees, that then you shall go out to battle: for God has gone forth before you to smite the army of the Philistines.
16David therefore did as God commanded him: and they struck the army of the Philistines from Gibeon even to Gezer.
17And the fame of David went out into all lands; and the LORD brought the fear of him upon all nations.