17 When the Philistines heard that David had been anointed king over Israel, they all went up to find [him], but [he] heard of it and went down to the stronghold. 18 The Philistines also came and spread themselves in the Valley of Rephaim. 19 David inquired of the Lord, saying, Shall I go up against the Philistines? Will You deliver them into my hand? And the Lord said to David, Go up, for I will surely deliver [them] into your hand. 20 And David came to Baal-perazim, and he smote them there, and said, The Lord has broken through my enemies before me, like the bursting out of great waters. So he called the name of that place Baal-perazim [Lord of breaking through]. 21 There the Philistines left their 1 images, and David and his men took them away.
22 The Philistines came up again and spread themselves out in the Valley of Rephaim. 23 When David inquired of the Lord, He said, You shall not go up, but go around behind them and come upon them over opposite the mulberry (or balsam) trees. 24 And when you hear the sound of marching in the tops of the mulberry trees, then bestir yourselves, for then has the Lord gone out before you to smite the army of the Philistines. 25 And David did as the Lord had commanded him, and smote the Philistines from Geba to Gezer.