Alfred the Great defeated the Danish Great Heathen Army under Guthrum at Edington in 878, saving Wessex and securing the peace and baptism that shaped a united England.
The Battle of Edington, fought in May 878, saved the Kingdom of Wessex and, through it, the future of a united England. Months after Guthrum's surprise midwinter attack had driven Alfred the Great into the Somerset marshes of Athelney, the king raised the levies of the surviving shires and defeated the Danish Great Heathen Army in the open field on the Wiltshire downs.
The victory did not destroy the Danes but broke their grip: Guthrum surrendered, accepted Christian baptism with Alfred as his godfather, and withdrew to East Anglia — the settlement that stabilised the Wessex–Danelaw frontier and let Alfred build the burhs, fleet, and learning that made his reconquest possible.
By 878 the Great Heathen Army had destroyed the kingdoms of Northumbria, East Anglia, and Mercia, leaving Wessex alone. Guthrum's attack on Chippenham in January 878 caught Alfred off guard, overran much of the kingdom, and reduced the king to a fugitive court at Athelney, waging a guerrilla resistance from the marshes.
In the seventh week after Easter Alfred rode to "Egbert's Stone" on the Wiltshire border, where the levies of Somerset, Wiltshire, and part of Hampshire rallied to him. Two days later he met the Danish army at Edington.
Alfred commanded the West Saxon fyrd — the shire levies of free landholders — fighting in the close shield-wall the Chronicle describes. No numbers survive for either side; the West Saxon force was whatever the three shires could raise at short notice against a Danish army that had been raiding at will.
Guthrum led the mobile field army of the Danes that had wintered at Chippenham. His was the veteran host that had toppled three English kingdoms; Alfred's was the last that had not yet fallen.
Asser and the Anglo-Saxon Chronicle give the essentials rather than a tactical narrative: Alfred "fought fiercely with a compact shield-wall against the whole army of the Vikings", and after long struggle put them to flight. The West Saxons pursued the Danes to their fortress at Chippenham and blockaded it.
After a fortnight, starving and without hope of relief, Guthrum sued for peace. He gave hostages, swore to leave Wessex, and — extraordinarily — agreed to be baptised.
Three weeks after the surrender Guthrum was baptised at Aller near Athelney, Alfred standing as his godfather and renaming him Æthelstan; the Danes withdrew to East Anglia, and the later Treaty of Alfred and Guthrum fixed the frontier along Watling Street. The immediate crisis of the Viking conquest was over.
Edington bought the years in which Alfred built the burh system, reformed the army and coinage, restored London (886), and launched the learning revival that made Wessex the nucleus of England. His son Edward the Elder and grandson Æthelstan turned that survival into the reconquest of the Danelaw and the making of one English kingdom — all resting on the field at Edington.