2 Samuel 5:3
So all the elders of Israel came to the king to Hebron; and king David made a league with them in Hebron before the LORD: and they anointed David king over Israel. So all the elders of Israel came to the king to Hebron; and king David made a league with them in Hebron before the LORD: and they anointed David king over Israel.
All the elders of Israel came to David at Hebron, where he entered into a league or covenant with them before the Lord, and they anointed him king over Israel. That gathering and coronation at Hebron united the tribes under his rule in a quiet yet decisive settlement. Pledges of loyalty from the people accompanied the covenant then made.
The earlier anointing by Samuel had foretold this inauguration, pointing forward to what now took place. David was established as king by God's appointment at the appointed time, not as the result of personal ambition. In this solemn consecration he was set apart to serve as God's vicegerent.