Viking expansion was finally checked by Alfred the Great and, in 878, a treaty between the Anglo-Saxons and the Vikings established the Danelaw, splitting the country along a line roughly from London to Chester, giving the Norsemen control over the north and east and the Anglo-Saxons the south and west.