Stephen attacked the castle in 1139, initially intending to besiege it, as the walls were considered impregnable to assault. Brien had brought in considerable supplies – contemporaries believed the castle could survive a siege for several years if need be – and Stephen changed his mind, putting up two counter-castles to contain Wallingford along the road to Bristol, before continuing west. The next year, Miles of Gloucester, possibly acting under orders from Robert of Gloucester, struck east, destroying one of the counter-castles outside Wallingford. The civil war between Stephen and Matilda rapidly descended into an attritional campaign, in which castles like Wallingford played a critical role in efforts by both sides to secure the Thames Valley. After the fall of Oxford to Stephen in 1141, Matilda fled to Wallingford, and the importance of the castle continued to grow.