8 And 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. 9 And the Philistines came and spread themselves in the valley of Rephaim. 10 And David enquired of God, saying, Shall I go up against the Philistines? Wilt thou deliver them into my hand? And the LORD said unto him, Go up, for I will deliver them into thy hands. 11 So they came up to Baalperazim, and David smote 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 Baalperazim. 12 And they left their gods there, and David gave a commandment, and they were burned with fire.
13 And the Philistines yet again spread themselves abroad in the valley. 14 Therefore, David enquired again of God; and God said unto him, Do not go up after them; go around them to come upon them over against the mulberry trees; 15 and it shall be, when thou shalt hear a sound of marching in the tops of the mulberry trees, that then thou shalt go out to battle; for God shall go forth before thee to smite the host of the Philistines. 16 David, therefore, did as God commanded him, and they smote the host of the Philistines from Gibeon even to Gazer. 17 And the fame of David went out into all those lands, and the LORD put the fear of him upon all the Gentiles.