The Five Boroughs or The Five Boroughs of the Danelaw (Old Norse: Fimm Borginn) were the five main towns of Danish Mercia (what is now the East Midlands). These were Derby, Leicester, Lincoln, Nottingham and Stamford. The first four would later become county towns.
Viking raids began in England in the late 8th century, and were largely of the 'hit and run' sort. However, in 865 various Viking armies combined and landed in East Anglia, not to raid but to conquer the four Anglo-Saxon kingdoms of England. The annals described the combined force as the Great Heathen Army. In 871, the campaign was reinforced when the Great Summer Army arrived from Scandinavia.
In 874, following their winter stay in Repton, the Great Heathen Army drove the Mercian king into exile and conquered Mercia; the exiled Mercian king was replaced by Ceolwulf II of Mercia. According to Alfred the Great's biographer, Asser, the Vikings then split into two bands.Halfdan led one band north to Northumbria.Ceolwulf II was installed as the Mercian king by the Vikings, who returned in 877 to partition Mercia. The west of the kingdom went to Ceolwulf II, whilst in the east the Five Boroughs began as the fortified burhs of five Danish armies who settled the area and introduced Danelaw, their native law and customs.
Each of the Five Boroughs was ruled as a Danish Jarldom, controlling lands around a fortified burh, which served as the centre of political power. These rulers were probably initially subject to their overlords in the Viking Kingdom of Jorvik (or York) and operated their armies sometimes independently but often in alliance with rulers of their neighbours. In addition to the Five Boroughs there were also a number of very large Danish settlements to the south, including Northampton and Bedford which existed in a similar fashion.