The Romans arrived in Dorset during their conquest of Britain in AD 43. Maiden Castle was captured by a Roman legion under the command of Vespasian, and the Roman settlement of Durnovaria was established nearby. Bokerley Dyke, a large defensive ditch built by the county's post-Roman inhabitants near the border with modern-day Hampshire, delayed the advance of the Saxons into Dorset for almost 150 years. However, by the end of the 7th century Dorset had fallen under Saxon control and been incorporated into the Kingdom of Wessex. The Saxons established a diocese at Sherborne and Dorset was made a shire—an administrative district of Wessex and predecessor to the English county system—with borders that have changed little since. In 789 the first recorded Viking attack on the British Isles took place in Dorset on the Portland coast, and they continued to raid into the county for the next two centuries.