In 877 the Vikings divided Mercia, taking the eastern part for themselves and leaving Ceolwulf with the west. The Vikings went on to attack Wessex, leaving Ceolwulf free to renew Mercian claims of hegemony in Wales. At almost the same time as Alfred's victory over the Vikings in 878 at the Battle of Edington, Ceolwulf defeated and killed Rhodri Mawr, king of the north Welsh territory of Gwynedd. After Ceolwulf's disappearance in 879, Mercia began to fall under the hegemony of Wessex.