The feudal barony of Barnstaple had its caput at Barnstaple Castle, granted by William the Conqueror to Geoffrey de Montbray, who appears as its holder in the 1086 Domesday Book. The barony fell to the crown in 1095 after Montbray rebelled against King William II. William re-granted the barony to Juhel de Totnes, formerly feudal baron of Totnes. In about 1107, Juhel, who had already founded Totnes Priory, founded Barnstaple Priory, of the Cluniac order, dedicated to St Mary Magdalene. After Juhel's son died without children, the barony was split between the de Braose and Tracy families, before reuniting under Henry de Tracy. It then passed through several other families, before ending in the ownership of Margaret Beaufort (died 1509), mother of king Henry VII.