During the 8th century Wessex was overshadowed by Mercia, whose power was then at its height, and the West Saxon kings may at times have acknowledged Mercian overlordship. They were, however, able to avoid the more substantial control which Mercia exerted over smaller kingdoms. During this period Wessex continued its gradual advance to the west, overwhelming the British kingdom of Dumnonia (Devon). At this time Wessex took de facto control over much of Devon, although Britons retained a degree of independence in Devon until at least the 10th century. (William of Malmesbury claimed that the Britons and Saxons inhabited Exeter "as equals" until 927.) As a result of the Mercian conquest of the northern portion of its early territories in Gloucestershire and Oxfordshire, the Thames and the Avon now probably formed the northern boundary of Wessex, while its heartland lay in Hampshire, Wiltshire, Berkshire, Dorset and Somerset. The system of shires which was later to form the basis of local administration throughout England (and eventually, Ireland, Wales and Scotland as well) originated in Wessex, and had been established by the mid-8th century.