In the next four years, Vikings gained further land in the kingdoms of Mercia and East Anglia as well. King Alfred continued his conflict with the invading forces, but was driven back into Somerset in the south-west of his kingdom in 878, where he was forced to take refuge in the marshes of Athelney. Alfred regrouped his military forces and defeated the armies of the Norse monarch of East Anglia, Guthrum, at the Battle of Edington (May 878). In 886, the Wessex and the Norse-controlled, East Anglian governments signed the Treaty of Wedmore, which established a boundary between the two kingdoms. The area to the north and east of this boundary became known as the Danelaw because it was under Norse political influence, whilst those areas south and west of it remained under Anglo-Saxon dominance. Alfred's government set about constructing a series of defended towns or "burhs", began the construction of a navy, and organised a militia system (the "fyrd") whereby half of his peasant army remained on active service at any one time. To maintain the burhs, and the standing army, he set up a taxation and conscription system known as the Burghal Hidage. In 892, a new Viking army, with 250 ships, established itself in Appledore, Kent and another army of 80 ships soon afterwards in Milton Regis. The army then launched a continuous series of attacks on Wessex. However, due in part to the efforts of Alfred and his army, the kingdom's new defences proved to be a success, and the Viking invaders were met with a determined resistance and made less of an impact than they had hoped. By 896, the invaders dispersed - instead settling in East Anglia and Northumbria, with some instead sailing to Normandy. Alfred's policy of opposing the Viking settlers continued under his daughter Æthelflæd, who married Æthelred, Ealdorman of Mercia, and also under her brother, King Edward the Elder (reigned 899-924). In 920 the Northumbrian government and the Scots government both submitted to the military power of Wessex, and in 937 the Battle of Brunanburh led to the collapse of Norse power in northern Britain. Edward's son Edmund became king of the English in 939. However, when Edmund was killed in a brawl, his younger brother, Eadred of Wessex took over as king.