The Danelaw (, Danish: Danelagen; Norwegian: Danelagen; Old English: Dena lagu) was the part of England between the late ninth century and the Norman Conquest under Anglo-Saxon rule in which Danish laws applied. The Danelaw originated in the conquest and occupation of large parts of eastern and northern England by Danish Vikings in the late ninth century. The term applies to the areas in which English kings allowed the Danes to keep their own laws following the early tenth-century Anglo-Saxon conquest of Danish-ruled eastern and northern England in return for the Danish settlers' loyalty to the English crown. "Danelaw" is first recorded in the early 11th century as Dena lage.
The Danelaw originated from the invasion of the Great Heathen Army into England in 865, but the term was not used to describe a geographic area until the 11th century. With the increase in population and productivity in Scandinavia, Viking warriors, having sought treasure and glory in the nearby British Isles, "proceeded to plough and support themselves", in the words of the Anglo-Saxon Chronicle for 876.
Danelaw can describe the set of legal terms and definitions created in the treaties between Alfred the Great, the king of Wessex, and Guthrum, the Danish warlord, written following Guthrum's defeat at the Battle of Edington in 878, starting with the Treaty of Wedmore.
Between the aftermath of the Treaty of Wedmore and Guthrum's death in 890, the Treaty of Alfred and Guthrum was formalised, defining the boundaries of their kingdoms, with provisions for peaceful relations between the Danes and the Anglo-Saxons, including allowing the self-governance of the Danes in exchange of loyalty to England. The language spoken in England was affected by this clash of cultures, with the emergence of Anglo-Norse dialects.
The Danelaw approximately covered Yorkshire, the central and eastern Midlands, and the East of England.
From around 800, there had been waves of Norse raids on the coastlines of Britain and Ireland. In 865, instead of raiding, the Danes landed a large army in East Anglia, with the intention of conquering the four Anglo-Saxon kingdoms of England. The armies of various Danish leaders had collaborated to make one combined force under a leadership that included Halfdan Ragnarsson and Ivar the Boneless, the sons of the legendary Viking leader Ragnar Lodbrok. The combined army was described in the annals as the Great Heathen Army. In 867 they captured Northumbria and its capital, York ("Jórvík"), defeating both the recently deposed King Osberht of Northumbria and the usurper Ælla of Northumbria. The Danes then placed an Englishman, Ecgberht I of Northumbria, on the throne of Northumbria as a puppet ruler.
King Æthelred of Wessex and his brother, Alfred, led their army against the Danes at Nottingham, but the Danes refused to leave their fortifications. King Burgred of Mercia negotiated peace with Ivar, with the Danes keeping Nottingham in exchange for leaving the rest of Mercia alone.
Under Ivar the Boneless, the Danes continued their invasion in 869 by defeating King Edmund of East Anglia at Hoxne and conquering the Kingdom of East Anglia. Once again, the brothers Æthelred and Alfred attempted to stop Ivar by attacking the Danes at Reading. They were repelled with heavy losses. The Danes pursued, and on 7 January 871, Æthelred and Alfred defeated the Danes at the Battle of Ashdown. The Danes retreated to Basing (in Hampshire), where Æthelred attacked and was, in turn, defeated. Ivar was able to follow up this victory with another in March at Meretum (now Marton, Wiltshire).
On 23 April 871, King Æthelred died and Alfred succeeded him as King of Wessex. His army was weak and he was forced to pay tribute to Ivar in order to make peace with the Danes. During this peace, the Danes turned to the north and attacked Mercia, a campaign that lasted until 874. The Danish leader Ivar died during this campaign. Ivar was succeeded by Guthrum, who finished the campaign against Mercia. In ten years, the Danes had gained control over East Anglia, Northumbria and Mercia, leaving just Wessex resisting.
Guthrum and the Danes brokered peace with Wessex in 876, when they captured the fortresses of Wareham and Exeter. Alfred laid siege to the Danes, who were forced to surrender after reinforcements were lost in a storm. Two years later, Guthrum again attacked Alfred, surprising him by attacking his forces wintering in Chippenham. King Alfred was saved when the Danish army coming from his rear was destroyed by inferior forces at the Battle of Cynuit. The modern location of Cynuit is disputed but suggestions include Countisbury Hill, near Lynmouth, Devon, or Kenwith Castle, Bideford, Devon, or Cannington, near Bridgwater, Somerset. Alfred was forced into hiding for a time, before returning in early 878 to gather an army and attack Guthrum at Edington. The Danes were defeated and retreated to Chippenham, where King Alfred laid siege and soon forced them to surrender. As a term of surrender, King Alfred demanded that Guthrum be baptised a Christian; King Alfred served as his godfather.
Edward the Elder and his sister, Æthelflæd, the Lady of the Mercians, conquered Danish territories in the Midlands and East Anglia in a series of campaigns in the 910s, and some Danish jarls who submitted were allowed to keep their lands. Viking rule ended when Eric Bloodaxe was driven out of Northumbria in 954.
The reasons for the waves of immigration were complex and bound to the political situation in Scandinavia at that time; they occurred when Viking settlers were also establishing their presence in the Hebrides, Isle of Man, Orkney, Shetland, Faroe Islands, Ireland, Iceland, Greenland, L'Anse aux Meadows, France (Normandy), the Baltics, Russia and Ukraine (see Kievan Rus').
The Danes did not give up their designs on England. From 1016 to 1035, Cnut the Great ruled over a unified English kingdom, itself the product of a resurgent Wessex, as part of his North Sea Empire, together with Denmark, Norway and part of Sweden. Cnut was succeeded in England on his death by his son Harold Harefoot, until he died in 1040, after which another of Cnut's sons, Harthacnut, took the throne. Since Harthacnut was already on the Danish throne, this reunited the North Sea Empire. Harthacnut lived only another two years, and from his death in 1042 until 1066 the monarchy reverted to the English line in the form of Edward the Confessor.
Edward died in January 1066 without an obvious successor, and an English nobleman, Harold Godwinson, took the throne. Later that year, two rival claimants to the throne led invasions of England in short succession. First, Harald Hardrada of Norway took York in September, but was defeated by Harold at the Battle of Stamford Bridge, in Yorkshire. Then, three weeks later, William of Normandy defeated Harold at the Battle of Hastings, in Sussex, and in December he accepted the submission of Edgar the Ætheling, last in the line of Anglo-Saxon royal succession, at Berkhamsted.
The Danelaw appeared in legislation as late as the early 12th century with the Leges Henrici Primi, where it is referred to as one of the laws together with those of Wessex and Mercia into which England was divided.
793 – Viking raid on Lindisfarne
800 – Waves of Danish assaults on the coastlines of the British Isles.
865 – Danish raiders first began to settle in England. Led by the brothers Halfdan and Ivar the Boneless, they wintered in East Anglia, where they demanded and received tribute in exchange for a temporary peace. From there, they moved north and attacked Northumbria, which was in the midst of a civil war between the deposed king Osberht and a usurper Ælla. The Danes used the civil turmoil as an opportunity to capture York, which they sacked and burned.