1 Chronicles 14:8-10

14:8 When the Philistines heard that David had been anointed king of all Israel, all the Philistines marched up to confront him. When David heard about it, he marched out against them. 14:9 Now the Philistines had come and raided the Valley of Rephaim. 14:10 David asked God, “Should I march up against the Philistines? Will you hand them over to me?” The Lord said to him, “March up! I will hand them over to you!”