2 Samuel 5:3-4

5:3 When all the leaders of Israel came to the king at Hebron, King David made an agreement with them in Hebron before the Lord. They designated David as king over Israel. 5:4 David was thirty years old when he began to reign and he reigned for forty years.