Alfred showed a wise precaution against future assaults in constructing fortresses at the most important points within his control. Before his day the Saxons had but few fortified positions, and this want of forts had greatly facilitated the Danish conquest. But the Danes, as soon as they gained a strong position, fortified it, and were never afterwards ejected by force. Probably Alfred took the hint from them. He rebuilt and strengthened the fortresses along the coast, as he had four precious years of unmolested work; and for this his small kingdom was doubtless severely taxed. He imported skilled workmen, and adopted the newest improvements. He made use of stone instead of timber, and extended his works of construction to palaces, halls, and churches, as well as castles. So well built were his fortifications, that no strong place was ever afterwards wrested from him. In those times the defence of kingdoms was in castles. They marked the feudal ages equally with monasteries and cathedral churches. Castles protected the realm from invasion and conquest, as much as they did the family of a feudal noble. The wisdom as well as the necessity of fortified cities was seen in a marked manner when the Northmen, in 885, stole up the Thames and Medway and made an unexpected assault on Rochester. They were completely foiled, and were obliged to retreat to their ships, leaving behind them even the spoil they had brought from France. This successful resistance was a great moral assistance to Alfred, since it opened the eyes of bishops and nobles to the necessity of fortifying their towns, to which they had hitherto been opposed, being unwilling to incur the expense. So it was not long before Alfred had a complete chain of defences on the coast, as well as around his cities and palaces, able to resist sudden attacks,—which he had most to fear. His great work of fortification was that of London, which, though belonging to him by the peace of Wedmore, was neglected, fallen to decay, filled with lawless bands of marauders and pirates, and defenceless against attack. In 886 he marched against this city, which made no serious resistance; rebuilt it, made it habitable, fortified it, and encouraged people to settle in it, for he foresaw its vast commercial importance. Under the rule of his son Ethelred, it regained the pre-eminence it had enjoyed under the Romans as a commercial centre.
Having done what he could to protect his dominion from sudden attacks, Alfred then turned his attention to the reorganization of his army and navy. Strictly speaking he had no regular army, or standing force, which he could call his own. When the country was threatened the freemen flew to arms, under their eorls and ealdormen; and on this force the king was obliged to rely. They sometimes acted without his orders, obeying the calls of their leaders when danger was most imminent. On the men in the immediate neighborhood of danger the brunt of the contest fell. Nor could levies be relied upon for any length of time; they dwindled after a few weeks, in order to attend to their agricultural interests, for agriculture was the only great and permanent pursuit in the feudal ages. Everything was subordinate to labors in the field. The only wealth was in land, except what was hoarded by the clergy and nobles.