2 Samuel 5:17-19 (KJV)
17 But when the Philistines heard that they had anointed David king over Israel, all the Philistines came up to seek David; and David heard of it, and went down to the hold.
18 The Philistines also came and spread themselves in the valley of Rephaim.
19 And David enquired of the Lord, saying, Shall I go up to the Philistines? wilt thou deliver them into mine hand? And the Lord said unto David, Go up: for I will doubtless deliver the Philistines into thine hand.