1 Chronicles 11:1-9 NIV
All Israel came together to David at Hebron and said, “We are your own flesh and blood. In the past, even while Saul was king, you were the one who led Israel on their military campaigns. And the LORD your God said to you, ‘You will shepherd my people Israel, and you will become their ruler.’ ”
When all the elders of Israel had come to King David at Hebron, he made a covenant with them at Hebron before the LORD, and they anointed David king over Israel, as the LORD had promised through Samuel.
David and all the Israelites marched to Jerusalem (that is, Jebus). The Jebusites who lived there said to David, “You will not get in here.” Nevertheless, David captured the fortress of Zion—which is the City of David.
David had said, “Whoever leads the attack on the Jebusites will become commander in chief.” Joab son of Zeruiah went up first, and so he received the command.
David then took up residence in the fortress, and so it was called the City of David. He built up the city around it, from the terraces to the surrounding wall, while Joab restored the rest of the city. And David became more and more powerful, because the LORD Almighty was with him.
NIV: New International Version