Coenwulf was the son of Cuthbert, a Mercian nobleman. He came to the throne in 796, the same year Offa and his son Ecgfrith both died. At the same time Coenwulf became king, Eadberht Praen set himself up as king of Kent. An Eadwald set himself up as king of the East Angles and began issuing coins. When Eadberht Praen expelled Aethelheard, the Archbishop of Canterbury from Kent, Coenwulf contacted Pope Leo III and got permission to remove the new Kentish king. Eadbert attacked Kent, and captured Eadbert. He then set up his brother Cuthred as king of Kent. Coenwulf then dealt with East Anglia where Eadwald had tried to gain independence from Mercia. In 799 Coenwulf made a peace treaty with Wessex. He restored Mercian power to southern England very quickly. He then began using the style of Charlemagne calling himself king and emperor. He attacked the Welsh making raids on Gwynedd and Powys. In one of these battles Caradog ap Meirion, the king of Gwynedd was killed. In 801 King Eardwulf of Northumbria attacked Mercia. He accused Coenwulf of giving refuge to his enemies. Eventually the two made peace on equal terms. This was through the mediations of several bishops and nobles.