Then all the tribes of Israel came to David at Hebron, and said, "Look, we are your bone and flesh.
For some time, while Saul was king over us, it was you who led out Israel and brought it in. The Lord said to you: It is you who shall be shepherd of my people Israel, you who shall be ruler over Israel."
So all the elders of Israel came to the king at Hebron; and King David made a covenant with them at Hebron before the Lord, and they anointed David king over Israel.
David was thirty years old when he began to reign, and he reigned forty years.
At Hebron he reigned over Judah seven years and six months; and at Jerusalem he reigned over all Israel and Judah thirty-three years.
The king and his men marched to Jerusalem against the Jebusites, the inhabitants of the land, who said to David, "You will not come in here, even the blind and the lame will turn you back"—thinking, "David cannot come in here."
Nevertheless David took the stronghold of Zion, which is now the city of David.
David had said on that day, "Whoever would strike down the Jebusites, let him get up the water shaft to attack the lame and the blind, those whom David hates." Therefore it is said, "The blind and the lame shall not come into the house."
References for 2 Samuel 5:8
David occupied the stronghold, and named it the city of David. David built the city all around from the Millo inward.
And David became greater and greater, for the Lord, the God of hosts, was with him.
King Hiram of Tyre sent messengers to David, along with cedar trees, and carpenters and masons who built David a house.
David then perceived that the Lord had established him king over Israel, and that he had exalted his kingdom for the sake of his people Israel.
In Jerusalem, after he came from Hebron, David took more concubines and wives; and more sons and daughters were born to David.
These are the names of those who were born to him in Jerusalem: Shammua, Shobab, Nathan, Solomon,
Ibhar, Elishua, Nepheg, Japhia,
Elishama, Eliada, and Eliphelet.
When the Philistines heard that David had been anointed king over Israel, all the Philistines went up in search of David; but David heard about it and went down to the stronghold.
Now the Philistines had come and spread out in the valley of Rephaim.
David inquired of the Lord, "Shall I go up against the Philistines? Will you give them into my hand?" The Lord said to David, "Go up; for I will certainly give the Philistines into your hand."
So David came to Baal-perazim, and David defeated them there. He said, "The Lord has burst forth against my enemies before me, like a bursting flood." Therefore that place is called Baal-perazim.
References for 2 Samuel 5:20
The Philistines abandoned their idols there, and David and his men carried them away.
Once again the Philistines came up, and were spread out in the valley of Rephaim.
When David inquired of the Lord, he said, "You shall not go up; go around to their rear, and come upon them opposite the balsam trees.
When you hear the sound of marching in the tops of the balsam trees, then be on the alert; for then the Lord has gone out before you to strike down the army of the Philistines."
David did just as the Lord had commanded him; and he struck down the Philistines from Geba all the way to Gezer.