2 Samuel 5
The elders of all the Israelite tribes gathered to anoint David as their king, remembering that the Lord had said of David, "You will shepherd my people and will become their ruler". David and his men conquered and took up residence in the fortress of Zion (the City of David). David "became more and more powerful because the Lord God Almighty was with him... and (God) established him as king over Israel and had exalted his kingdom for the sake of His people, Israel". When the Philistines heard that Dvid had been anointed king over all Israel, they gathered their full forces after him. David inquired of the Lord, "Shall I go and attack the Philistines? Will you deliver them into my hands?". The Lord answered, instructing David to proceed and that he would defeat them. "So David did as the Lord commanded him, and he struck down the PHhilistines all the way from Gibeon to Gezer".