Scotland, invaded England during 1137 in support of her claim. Although Miles de Beauchamp declared himself in support of Stephen, the king decided to retake Bedford Castle before marching north. Stephen formed an army to besiege Bedford Castle but Miles gained advance warning of the attack and took in considerable supplies, preparing for a long siege. Stephen was unable to storm the castle and left a force under the command of Hugh to starve it into submission whilst he marched north to tackle the Scots invasion. Henry of Blois, the Bishop of Winchester, intervened in an attempt to produce a negotiated solution. Henry reached an agreement whereby after five weeks, the castle finally surrendered; the garrison were allowed to leave peacefully but the castle was handed over to the king. The deal struck by Miles and Henry appears to have left the surrounding estates in the hands of the Beauchamps, however, and in 1141 Miles returned and retook the castle itself, although no details are available as to how he achieved this. Miles subsequently supported the Empress, and in 1146, Ranulf, the Earl of Chester and temporarily on the side of the king, attacked and took the town of Bedford, but was unable to take the castle, which continued to be controlled by Miles until his death several years later. Towards the end of the war, Bedford Castle may have been attacked again; Henry II, during the final year of the conflict in 1153, marched through Bedford and documentary evidence shows damage to the town at this time. Historians are divided as to whether the castle was besieged at the same time. Mid-medieval period (1153–1224) Early in 1215 tensions grew between King John and a rebel faction of his barons, which would lead to the First Barons' War. The rebel barons attempted to besiege Northampton Castle; unsuccessful, they turned to Bedford Castle but the castle withstood the attack and they moved south to London. Bedford was held at the time by William de Beauchamp but his loyalty came into question and he rebelled against John. Falkes de Breauté, a key Anglo-Norman leader loyal to John, resisted and seized Bedford Castle back for John in 1216. In return John gave Falkes the Honour of Bedford, and in practical terms the castle as well, although it is unclear whether he gave Falkes the role of castellan or ownership of the castle itself.