Early reference to Bedfordshire's political history is scanty. In 571, Cuthwulf inflicted a severe defeat on the Britons at Bedford and took four towns. During the Heptarchy what is now the shire formed part of Mercia; by the Treaty of Wedmore it became Danish territory, but it was recovered by King Edward (919-921). The first actual mention of the county comes in 1016 when King Canute laid waste to the whole shire. There was no organised resistance to William the Conqueror within Bedfordshire, though the Domesday survey reveals an almost complete substitution of Norman for English landholders.