The castle was held by the Norman kings until the civil war of the Anarchy broke out in 1139. Castles played a key role in the conflict between the Empress Matilda and King Stephen, and in 1143 Geoffrey de Mandeville, a supporter of the Empress, attacked Cambridge; the town was raided and the castle temporarily captured. Stephen responded with a counter-attack, forcing Geoffrey to retreat into the Fens and retaking the castle. Cambridge Castle remained exposed, however, and Stephen decided to build a supporting fortification at Burwell to provide additional protection. Geoffrey died attacking Burwell Castle the following year, leaving Cambridge Castle secure.