Nothing is known about the condition of the walls between the end of the Roman occupation in the late 4th century and the refounding of Chester by Æthelflæd as a burgh in 907 as part of the reconquest of Mercia by the Anglo-Saxons. Parts of the Roman walls were still present, as they continue to stand today. The Anglo-Saxons certainly repaired the northern and eastern sections of the Roman walls. At some time Roman stones, including tombstones, were used in repairs, but it uncertain whether this was during this period or later. There is evidence, including the discovery of a Saxon U-shaped ditch, that the wall was extended from the southeast corner of the Roman wall to the river, forming an L-shaped defence, but whether this would have been a stone or an earth defence is unknown. There is a reference to repairing the walls in the Domesday Survey. Following the Norman conquest the army of William the Conqueror arrived in Chester in 1069–70, and the king ordered that a castle should be built. This was constructed outside the site of the Roman fortress, to the southwest in an elevated position overlooking the River Dee. This necessitated the extension of the walls to the west and south to incorporate the castle, leading to the circuit of the walls currently present. Three new gates were built, the Watergate in the west wall, and the Shipgate and Bridgegate. The latter two gates were certainly built by the 1120s, and it is thought that the medieval circuit of the walls was complete by 1162. They then consisted of the curtain wall itself, gates, towers and a ditch. The Saxon ditch has been filled in, and the medieval ditches were dug further from the walls. The earlier ditch had been shallow, probably no more than deep. However, following a siege of Chester Castle during the Second Barons' War in 1265, a larger ditch was dug, this one being over 2 m (6 ft) deep.