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.