By this time, only the kingdom of Wessex had not been conquered. In May of 878 Alfred the Great defeated the Vikings at the Battle of Edington, and a treaty was agreed whereby the Vikings were able to remain in control of much of northern and eastern England.