William the Conqueror gave orders to build a castle in Shrewsbury in around 1067. It was greatly extended under Roger de Montgomery in around 1070 as a base for operations into Wales, an administrative centre and as a defensive fortification for the town, which was otherwise protected by the loop of the River Severn. The castle later had town walls added; some of the town walls still remain today. The castle was briefly held by Llywelyn the Great, Prince of Wales, in 1215.