At the beginning of the 9th century, England was almost completely under the control of the Anglo-Saxons, with Mercia and Wessex the most important southern kingdoms. Mercia was dominant until the 820s, and it exercised overlordship over East Anglia and Kent, but Wessex was able to maintain its independence from its more powerful neighbour. Offa, king of Mercia from 757 to 796, was the dominant figure of the second half of the 8th century. King Beorhtric of Wessex (786–802), married Offa's daughter in 789. Beorhtric and Offa drove Æthelwulf's father Egbert into exile, and he spent several years at the court of Charlemagne in Francia. Egbert was the son of Ealhmund, who had briefly been King of Kent in 784. Following Offa's death, King Coenwulf of Mercia (796–821) maintained Mercian dominance, but it is uncertain whether Beorhtric ever accepted political subordination, and when he died in 802 Egbert became king, perhaps with the support of Charlemagne. For two hundred years three kindreds had fought for the West Saxon throne, and no son had followed his father as king. Egbert's best claim was that he was the great-great-grandson of Ingild, brother of King Ine (688–726), and in 802 it would have seemed very unlikely that he would establish a lasting dynasty.