The town walls were once protected by four towers and two gatehouses, although only one of the gatehouses still survives. The castle and town's gatehouse were constructed of decorative stonework, intended to symbolise royal authority and civic pride. History 13th century Denbigh Castle was constructed within what was originally the Welsh patrimony of Perfeddwlad. The patrimony controlled the pastoral farming lands on the Denbigh Moors and formed a royal residence, llys, for the Welsh princes. Perfeddwlad was strategically located along the Welsh border but its ownership was disputed and the territory was fought over by the Normans and Welsh many times during the 11th and 12th centuries. In 1277, the Welsh prince Dafydd ap Gruffudd was granted Perfeddwlad by the English king, Edward I, who at the time was allied with Dafydd in his struggle against his brother Prince Llywelyn. Dafydd rebuilt the existing residence, creating a substantial castle. It is uncertain what form it took or exactly where on the current castle site it was located, but it included a bakehouse, buttery, chapel and a hall, and it became Dafydd's main stronghold. The Welsh called the settlement Dinbych, an abbreviation of Dinas Fechan, meaning "little fortress". In 1282, Dafydd and Llywelyn rebelled against the King. Edward invaded North Wales with a huge army; after a month long siege, Dinbych fell to his forces in October 1282. The King created a new lordship to govern the district around Dinbych, which he renamed Denbigh and granted these lands to Henry de Lacy, the Earl of Lincoln. With the help of James of St George, the King's master mason, Edward and Henry made plans for the construction of a new castle to govern the area, symbolically placed on top of the former llys. Edward continued into Snowdonia, leaving Henry to continue the work at Denbigh, using local labourers and possibly men brought from Henry's estates in England. The western and southern sides of the castle and the new town walls were built first, in order to protect the construction teams and by 1285, Henry gave the new town its first charter. Work on the rest of the defences continued for several years. The castle and town formed part of a wider landscape controlled by de Lacey, including a nearby manor, a dovecote, barn and fishponds, which were all important symbols of lordship during the period. He similarly established three parks around the