In 865, East Anglia was invaded by the Danish Great Heathen Army, which occupied winter quarters and secured horses before departing for Northumbria. The Danes returned in 869 to winter at Thetford, before being attacked by the forces of Edmund of East Anglia, who was defeated and killed at Hægelisdun (identified variously as Bradfield St Clare in 983, near to his final resting place at Bury St Edmunds, Hellesdon in Norfolk (documented as Hægelisdun c. 985) or Hoxne in Suffolk, and now with Maldon in Essex). From then on East Anglia effectively ceased to be an independent kingdom. Having defeated the East Angles, the Danes installed puppet-kings to govern on their behalf, while they resumed their campaigns against Mercia and Wessex. In 878 the last active portion of the Great Heathen Army was defeated by Alfred the Great and withdrew from Wessex after making peace. In 880 the Vikings returned to East Anglia under Guthrum, who according to the medieval historian Pauline Stafford, "swiftly adapted to territorial kingship and its trappings, including the minting of coins."
Along with the traditional territory of East Anglia, Cambridgeshire and parts of Bedfordshire and Hertfordshire, Guthrum's kingdom probably included Essex, the one portion of Wessex to come under Danish control. A peace treaty was made between Alfred and Guthrum sometime in the 880s. (from Wikipedia)