During the Anglo Saxon period after the Romans had withdrawn, the United Kingdom was split into various regions which vied for power over each other. Northumbria and Wessex were often the most powerful.
Northumbria gained power shortly after the withdrawal of the Romans. Over time, Northumbria became the site of many Viking landings and raids. While the Vikings did not immediately launch a full invasion, they harrassed the UK coastline for a long period of time.
Wessex eventually became the dominant kingdom as Vikings launched a full scale invasion defeating Northumbria. Alfred the Great raised an army to combat the threat. Unfortunately, he was defeated the first time but managed to put together another army to stop the Viking invasion.
Eventually, pressure from two directions put an end to Anglo Saxon rule in England. Viking invasion from the North and East led to Canute briefly holding the throne. Though he was defeated by an English force, Norman invasion from the South meant William the Conquerer became the new king of England, beginning the Norman period.