Caerphilly Castle (Welsh: Castell Caerfili) is a Norman castle that dominates the centre of the town of Caerphilly in south Wales. It is the largest castle in Wales, the second largest in Britain (second to Windsor castle) and is one of the largest fortresses in Europe. Built mainly between 1268 and 1271, it is an early example of a concentric castle and is surrounded by large but fairly shallow artificial lakes to slow attackers and prevent the undermining of its walls.
Unlike many other Welsh castles, Caerphilly castle was not built by Edward I in his crack-down on the Welsh lords, but by Gilbert ‘the Red’ de Clare, a powerful, redheaded nobleman of Norman descent as a response to a dispute between him and a nobleman of Welsh origin, Llywelyn who was later a supporter of Simon de Montfort.
At first the dispute was mediated by Henry III (1216-1272), who sent a Bishop to take temporary control of the castle until matters were settled. However, Gilbert soon regained control of the castle.
Gilbert retained control of the castle until the reign of Edward I (1272-1307). When Llywelyn failed on five occasions to provide services demanded of him by the King, he was stripped of his lordship and his lands were invaded by Edward. This removed much of the requirement for the castle, and from then on it was principally used as a base of operations for the de Clares and later the Despensers. Towards the end of the 14th century, the family moved to a more comfortable location and much of the castle was abandoned. Some maintenance was done by its subsequent owners, Richard Beauchamp (d. 1439), Richard Neville (d. 1471) and Jasper Tudor (d. 1495), probably because of its strategic usefulness, but this petered out at the end of the 15th century.
The castle gradually fell into disrepair though some maintenance was done on parts of it, notably the Eastern gate house which was used as a prison. Despite being mostly untouched by the Civil War of 1642-1648, damage inflicted by the parliamentary army in 1648 led to one of the most notable features of the castle, its leaning south-east tower. The castle’s condition worsened until the later part of the 18th century when the first Marquess of Bute began preservation work. Three generations of Marquesses recorded the details of the castle, cleared structures built against its walls as leases ended and eventually undertook painstaking analysis and restoration of the fallen masonry. Finally it was handed over to the government in 1950; its restoration and preservation is continued today by Cadw (Welsh Historic Monuments).
There is some debate over whether the damage to the famous leaning tower was actually inflicted by the Parliamentary Army, or caused by subsidence.
Four replica siege engines are on display in the castle.
Caerphilly Castle is also the name of a Castle class locomotive.