Here's a breakdown:
* The Viking Invasions: The Danelaw wasn't a formal treaty but rather a region in England where Vikings held significant power and influence. It came about as a result of the Viking invasions, starting in the late 8th century.
* King Alfred the Great: King Alfred the Great of Wessex (871-899) successfully repelled the Vikings and established a peace treaty that formally recognized the Danelaw in the Treaty of Wedmore (878). This treaty established the boundaries of the Danelaw, which included large parts of eastern and northern England.
* The Norse Kings: The Danelaw was ruled by a succession of Norse kings, such as Guthrum (who signed the Treaty of Wedmore), and later by various Viking jarls (earls).
* The Integration: Over time, the Viking population within the Danelaw gradually assimilated into Anglo-Saxon society. The legal system of the Danelaw, known as "Danelaw", eventually blended with the Anglo-Saxon legal system, leaving a lasting mark on English law.
So, while the Danelaw is often associated with King Alfred the Great, it wasn't a document he drew up himself. He was a key figure in its establishment and its subsequent form, but many other individuals and events played a part.