The result of this battle was a treaty between Alfred and the Danes. The Danish king, Guthrum, desired to settle in England, where he had lived for many months; and he sent messengers to Alfred, offering to be baptized as a Christian, promising never again to bear arms against the people of Wessex. Alfred accepted the Danish proposal gladly, for his people were weary to death of war and hardship, and needed peace to till their lands. So Alfred, while he probably could have conquered all England, left the Danes in the part that had been most thoroughly conquered by them, calling it the Danelaw, and gave the Danes permission to live there unmolested, providing they promised to disturb his kingdom no further. The pact held good, and although at times it was broken, in general it was adhered to for many years. Saxons and Danes intermingled and married into the families of their enemies, and from them a new people gradually came into being.

As soon as peace was assured Alfred provided against future attacks on the part of the Northmen by ordering all the forts and strongholds throughout the kingdom of Wessex to be rebuilt and put into good order. He knew that the Danes could not be trusted and feared that at any time new galleys might be seen bearing down upon the English coast. So he organized his army into several parts and thought out a system by means of which soldiers might always be on guard duty to withstand an invasion, while the rest of the people were peacefully tilling the soil.

He also framed a code of laws. In the war and confusion into which his country had been thrown, the laws had fallen into a sorry state and were frequently disobeyed. In his code Alfred did not introduce new laws, which his people disliked, but rather arranged and put in order the laws then existing, and his dominions soon became so orderly and so free from robbers that it is doubtful if all our police could do better to-day. Also the King found that the law had been hindered and impeded by many corrupt and worthless judges, some of whom knew nothing whatever about the duties of their office—and these he warned to study and acquaint themselves with what a judge must know or renounce their positions in law altogether.

Then the Danes came again. They landed with a large army and tried to take Rochester Castle. Alfred hastened to the relief of this fortress, which was a most important one, and drove them away, pressing them so hard that they scrambled on to their vessels and set sail for the open sea.

However, the Danes did not go back to their native land, but landed in Essex, where they were joined by their countrymen in the Danelaw, who thus broke the word that they had pledged to Alfred. The new Danish army was much larger than Alfred's and at first was victorious,—but the entire navy of Wessex came to the rescue of the English and vanquished sixteen Danish ships in a tremendous sea fight. The war then raged with varying fortunes until Alfred signed another agreement with Guthrum, and laid siege to London which had been taken by the Danes.

In due time London fell. Its capture gave Alfred a tremendous advantage over his enemies. He had the city strongly fortified and it stood as a barrier to Danish vessels that strove to work their way up the River Thames. Moreover it became one of the world's great trading centers, and merchants from all quarters of the earth visited it.

When the Danes were finally defeated, Alfred, according to his custom, lost no time in building up his kingdom. First of all he commenced to rebuild the monasteries and abbeys which had been destroyed by the invaders. The first one that he founded was at Athelney in Somersetshire, in the midst of the marshes where he had fled for refuge when the Danes overran his country. He also founded a number of other monasteries and abbeys, among them the abbey of Shaftesbury, making his daughter, Ethelgeda, the abbess.

Alfred loved books and learning, and had made his chief aim in life to acquire wisdom. He knew that if his people were to become really great they must labor in the arts and letters and acquire knowledge from books. Practically all the books of that time were written in Latin which few could read, so Alfred set himself about the task of making translations of the best and most valuable books of his day. The translation was done either under his direct care, or by his own hand, and the boon to his people was greater than can be told. Alfred ordered the famous Anglo-Saxon Chronicle to be written, which was designed by him to treasure up for future the historical happenings of his own time.

To make the most of his time, the King divided the day into three periods of eight hours each. In the first of these he labored for the Church; in the second for his kingdom, and the third was devoted to rest and recreation. But although he labored hard and gained much by performing these good and wise deeds, Alfred had not yet heard the last of his old enemies the Danes, who were to trouble him almost to the end of his life. After the defeats they had suffered at his hands they had turned toward Europe and followed there their usual course, killing and plundering and bearing the women and children into slavery. At last, however, they were defeated in battle by the Emperor of Germany and they turned once more to England, where they hoped the heroic king had relaxed his vigilance. Under the great viking, Hastings, a large force of them landed in Kent, and prepared to ravage the country.

Alfred sent his eldest son, named Edward, to keep close watch upon their movements, ordering him, however, not to engage them in battle until he himself should arrive with the bulk of the army. When he was on the march and when the Danes knew that a large force was advancing against them, they tried once more their old trick of pretending friendship in order to throw their enemies off their guard. Hastings sent to Alfred professions of friendship, and to show his apparent good faith sent with the messengers his two sons, requesting that they be baptized as Christians. Alfred received the two Danish princes with great joy. After they were baptized he welcomed them to a feast and sent them to their father with many costly presents.