2 Samuel 5:17-25

ASV(i) 17 And when the Philistines heard that they had anointed David king over Israel, all the Philistines went up to seek David; and David heard of it, and went down to the stronghold. 18 Now the Philistines had come and spread themselves in the valley of Rephaim. 19 And David inquired of Jehovah, saying, Shall I go up against the Philistines? wilt thou deliver them into my hand? And Jehovah said unto David, Go up; for I will certainly deliver the Philistines into thy hand. 20 And David came to Baal-perazim, and David smote them there; and he said, Jehovah hath broken mine enemies before me, like the breach of waters. Therefore he called the name of that place Baal-perazim. 21 And they left their images there; and David and his men took them away.
22 And the Philistines came up yet again, and spread themselves in the valley of Rephaim. 23 And when David inquired of Jehovah, he said, Thou shalt not go up: make a circuit behind them, and come upon them over against the mulberry-trees. 24 And it shall be, when thou hearest the sound of marching in the tops of the mulberry-trees, that then thou shalt bestir thyself; for then is Jehovah gone out before thee to smite the host of the Philistines. 25 And David did so, as Jehovah commanded him, and smote the Philistines from Geba until thou come to Gezer.