In 878, Alfred's army defeated the Danes at the battle of Eddington on the northern edge of Salisbury Plain.
Realising that he could not drive the Danes out of the rest of England, Alfred made a peace treaty with their king Guthrum, who was converted to Christianity and many of the Danes settled as farmers. Alfred negotiated a partition treaty with the Danes, in which a frontier was demarcated along the Roman Watling Street and northern and eastern England came under the jurisdiction of the Danes - an area known as 'Danelaw'.
Ethelfleda was born shortly before Alfred became king and she must have been about nine when Alfred made his peace treaty with the Danes. Clearly this period must have had a major influence on her life. We will never know how much time Ethelfleda spent with her father and whether Alfred trained his daughter to be a leader, but she must have learned the main skills of leadership from him.
Alfred reorganised the Wessex defences in recognition that efficient defence and economic prosperity were interdependent. He organised his army on a rota basis, so he could raise a 'rapid reaction force' to deal with raiders whilst still enabling them to tend their farms. He started a building programme of well-defended settlements across southern England known as burhs.