The Anglo-Saxons built the first settlement. Wallingford has been fortified since the Anglo-Saxon period when it was an important fortified borough of Wessex with the right to mint royal coinage. It was enclosed with substantial earthworks by King Alfred the Great in the ninth century as part of a network of fortified towns known as burhs, or burghs, to protect Wessex against the Vikings. These defences can still be clearly discerned as a group of four roughly square areas around the centre of the town and are well-preserved. Wallingford became the chief town of Berkshire and the seat of the county's Ealdorman.