John Hunyadi was also an eminent statesman. He actively took part in the civil war between the partisans of Wladislas I and the minor Ladislaus V, two claimants to the throne of Hungary in the early 1440s, on behalf of the former. Popular among the lesser nobility, the Diet of Hungary appointed him, in 1445, as one of the seven "Captains in Chief" responsible for the administration of state affairs until Ladislaus V (by that time unanimously accepted as king) came of age. The next Diet went even further, electing Hunyadi as sole regent with the title of governor. When he resigned from this office in 1452, the sovereign awarded him with the first hereditary title "(perpetual count of Beszterce/Bistrița") in the Kingdom of Hungary. He had by this time become one of the wealthiest landowners in the kingdom, and preserved his influence in the Diet up until his death.