Viking advance was halted only after a long struggle led heroically on the Saxon side by Alfred, king of Wessex. A treaty agreed at some time between 878 and 890 formalized the partition of England, with the large portion of “Viking” territory, in the north and east of the country, known as the Danelaw.