Ecgberht's father Ealhmund had been king of Kent in the 780s, which had brought his family into conflict with the ambitions of Offa of Mercia, who sought to impose direct rule on Kent. After his father's death, Ecgberht was driven from England into exile by Offa, with the co-operation of Beorhtric of Wessex and his accession to the throne of Wessex on Beorhtric's death in 802 was immediately followed by a violent clash with Mercia. However, the available sources reveal no further conflict between the two kingdoms before 825.