Then all the tribes of Israel went to David at Hebron and said to him, "We are your own flesh and blood.
In the past, even when Saul was still our king, you led the people of Israel in battle, and the Lord promised you that you would lead his people and be their ruler."
So all the leaders of Israel came to King David at Hebron. He made a sacred alliance with them, they anointed him, and he became king of Israel.
David was thirty years old when he became king, and he ruled for forty years. 1
References for 2 Samuel 5:4
He ruled in Hebron over Judah for seven and a half years, and in Jerusalem over all Israel and Judah for thirty-three years.
The time came when King David and his men set out to attack Jerusalem. The Jebusites, who lived there, thought that David would not be able to conquer the city, and so they said to him, "You will never get in here; even the blind and the crippled could keep you out." 2
References for 2 Samuel 5:6
(But David did capture their fortress of Zion, and it became known as "David's City.")
That day David said to his men, "Does anybody here hate the Jebusites as much as I do? Enough to kill them? Then go up through the water tunnel and attack those poor blind cripples." (That is why it is said, "The blind and the crippled cannot enter the Lord's house.")
References for 2 Samuel 5:8
After capturing the fortress, David lived in it and named it "David's City." He built the city around it, starting at the place where land was filled in on the east side of the hill.
He grew stronger all the time, because the Lord God Almighty was with him.
King Hiram of Tyre sent a trade mission to David; he provided him with cedar logs and with carpenters and stone masons to build a palace.
And so David realized that the Lord had established him as king of Israel and was making his kingdom prosperous for the sake of his people.
After moving from Hebron to Jerusalem, David took more concubines and wives, and had more sons and daughters.
The following children were born to him in Jerusalem: Shammua, Shobab, Nathan, Solomon,
Ibhar, Elishua, Nepheg, Japhia,
Elishama, Eliada, and Eliphelet.
The Philistines were told that David had been made king of Israel, so their army set out to capture him. When David heard of it, he went down to a fortified place.
The Philistines arrived at Rephaim Valley and occupied it.
David asked the Lord, "Shall I attack the Philistines? Will you give me the victory?" "Yes, attack!" the Lord answered. "I will give you the victory!"
So David went to Baal Perazim and there he defeated the Philistines. He said, "The Lord has broken through my enemies like a flood." And so that place is called Baal Perazim.
References for 2 Samuel 5:20
When the Philistines fled, they left their idols behind, and David and his men carried them away.
Then the Philistines went back to Rephaim Valley and occupied it again.
Once more David consulted the Lord, who answered, "Don't attack them from here, but go around and get ready to attack them from the other side, near the balsam trees.
When you hear the sound of marching in the treetops, then attack because I will be marching ahead of you to defeat the Philistine army."
David did what the Lord had commanded, and was able to drive the Philistines back from Geba all the way to Gezer.