When a Danish army broke a truce in early 878 and nearly captured Alfred at Chippenham, the king of Wessex spent the following weeks a fugitive in the marshes of Athelney, a retreat later legend would embroider with the story of the burned cakes. From that low point he rallied the levies of Somerset, Wiltshire and Hampshire and met Guthrum's army at Edington, winning a victory decisive enough that the Danish king sued for peace on Alfred's terms rather than his own.
The peace was sealed in specifically religious form: Guthrum agreed to be baptized, with Alfred receiving him from the font as sponsor at Aller and hosting the customary eight day chrism loosing at Wedmore afterward, so that the Treaty of Wedmore that followed was a conversion as much as a border settlement, fixing a line along which Danish and English, pagan and newly Christian, could each hold their own ground. That religious framing of the peace was not new to 878.
Two years earlier, in 876, an Anglo-Saxon Chronicle entry records a different Danish army swearing peace to Alfred on a sacred ring at Wareham, an oath the chronicler notes they had never before sworn to any people, evidence that even before Edington, English observers recognized which Norse religious forms carried genuine weight and used them deliberately in dealing with an enemy who did not yet share their God. Alfred's reputation as a defender of Christian Wessex was built as much on this repeated, hard-won negotiation with a still-pagan enemy as on the battle itself.