 But when Bernard of Septimania was captured by Charles the Bald for rebellion against his lord and executed in 844, the king bestowed his county of Toulouse on Fredelo.Pepin II of Aquitaine, who was leading the revolt against Charles, appointed Bernard's heir William to the county of Toulouse.Of the two claimants to Toulouse, William had the upper hand.