It was the seat of the Barony of Bedford. In 919 Edward the Elder built the town's first known fortress, on the south side of the River Ouse and there received the area's submission. This fortress was destroyed by the Danes. William II of England gave the barony of Bedford to Paine de Beauchamp, who built a new, very strong castle.