Alfred had succeeded Æthelred as king of Wessex in 871, and almost faced defeat against the Danish Vikings until his decisive victory at the Battle of Edington in 878. After the battle, the Vikings still ruled Northumbria, East Anglia and eastern Mercia, leaving only Wessex and western Mercia under Anglo-Saxon control. In the early 880s Æthelred, Lord of the Mercians, the ruler of western Mercia, accepted Alfred's lordship and married his daughter Æthelflæd, and around 886 Alfred adopted the new title King of the Anglo-Saxons as the ruler of all Anglo-Saxons not subject to Danish rule.