William was born in northern France in the mid-8th century, to Thierry IV, Count of Autun and Aldana. His son, and likely William himself was a relative of Charlemagne. The relationship is speculated to have come through William's mother, perhaps a daughter of Charles Martel, or through Thierry, apparently a close kinsman of Charlemagne's maternal great-grandmother (Bertrada of Prüm), with the two relationships not mutually exclusive. As a kinsman and trusted "comes", he spent his youth in the court of Charlemagne. In 788, Chorso, Count of , was captured by the Basque Adalric, and made to swear an oath of allegiance to the Duke of Gascony, Lupus II. Upon his release Charlemagne replaced him with his Frankish cousin William (790). William in turn successfully subdued the Gascons.