to be built within the wall to safeguard his position. The place selected was at the highest point, inside the northern angle of the wall, on a volcanic outcrop. The building of the castle was left to Baldwin FitzGilbert who was appointed castellan, amongst other honours. A deep ditch and internal rampart were constructed between the north-western and north-eastern city walls, forming a roughly square enclosure with sides of about . The Domesday Book of 1086 reported that 48 houses had been destroyed in Exeter since the King came to England—this has been interpreted by historians to mean that this many houses were on the site cleared for the castle. A large stone gatehouse, which still survives, was built into the bank at the south side of the enclosure. It has clear elements of Anglo-Saxon architecture, such as long-and-short quoins and double triangular-headed windows, suggesting that it was built very early by English masons on the Normans' orders. At this early stage the rampart was probably surmounted by a stockade, though two corner turrets were soon built where the bank met the city walls, the western one of which (mistakenly known as "Athelstan's Tower") is still present. The stockade was soon replaced by a masonry curtain wall. The remains of this wall shows that it was bonded into the repaired city walls, but not the gatehouse, indicating that it was built from the former towards the latter. Another early enhancement was the construction of a protective barbican over the city side of the drawbridge. There is evidence that the castle was attacked before it was completed. This evidence is both physical, in the form of repairs to Athelstan's Tower; and documentary, in a report made by Orderic Vitalis of an attack made on Exeter in 1069. In the early 12th century a chapel dedicated to St Mary was built within the castle walls. It had four prebendaries and was said to have been founded by William de Avenell, a son of the castle-builder Baldwin FitzGilbert; de Avenell also founded a priory at nearby Cowick. The siege of 1136 and after In 1136, Baldwin de Redvers seized the castle as part of his rebellion against King Stephen. Although Stephen's army moved quickly to besiege the castle, Redvers was able to resist for three months until the failure of his water supply, which had been provided by a well and probably a