Denbigh Castle and town walls ( ; ) were built to control the lordship of Denbigh after the Conquest of Wales by Edward I of England in 1282. The lands were granted to Henry de Lacy, Earl of Lincoln, who began to build a new walled town, colonised by immigrants from England, protected by a substantial castle and surrounded by deer parks for hunting. The work had not been completed by 1294, when the Welsh temporarily seized the castle during the Madog ap Llywelyn revolt. The defences continued to be improved, although the castle was not completely finished by the time of Henry's death in 1311. The castle passed between various owners in the first half of the 14th century, before coming under the control of the Mortimer family. Meanwhile, the walled town had proved impractical to live in, and a newer, much larger, settlement developed outside the defences. In 1400, the walled town was raided during the Glyndŵr Rising, although the castle itself remained secure throughout the rebellion. During the Wars of the Roses, Denbigh was attacked by Lancastrian forces; the walled town was attacked and burnt. In the aftermath, the old town was largely abandoned by its inhabitants, the walled area becoming an extension of the castle's defences. During the First English Civil War, Denbigh was held by the Royalists until it was captured by Parliamentarian forces in October 1646. The castle was seized by pro-Royalist soldiers in 1659, after which General George Monk ordered it to be slighted, with various parts of the walls and towers being demolished. The site deteriorated further over the years and the old walled town remained almost deserted. In the middle of the 19th century, the town created a committee to manage the ruins and carried out restoration work. The Office of Works assumed responsibility for the fortifications in 1914, with the site ultimately passing into the control of the Welsh Cadw heritage agency. Denbigh Castle is dominated by a triangle of three octagonal towers that forms its main entrance, considered by the historian John Goodall to be "the most architecturally sophisticated gatehouse of the thirteenth century". Eight mural towers protect the rest of its curtain wall, further protected by barbicans and a mantlet of defensive terraces and walls. The castle connects to the town walls, which remain largely intact and stretch for around 1,100 metres (3,600 ft) around the old town.