Caerphilly Castle is a medieval fortification in Caerphilly in South Wales. The castle was constructed by Gilbert de Clare in the 13th century as part of his campaign to conquer Glamorgan, and saw extensive fighting between Gilbert and his descendants and the native Welsh rulers. Surrounded by extensive artificial lakes – considered by historian Allen Brown to be "the most elaborate water defences in all Britain" – it occupies around 30 acres (12 ha) and is the second largest castle in Britain. It is famous for having introduced concentric castle defences to Britain and for its large gatehouses.
Gilbert began work on the castle in 1268 following his occupation of the north of Glamorgan, with the majority of the construction occurring over the next three years at a considerable cost. The project was opposed by Gilbert's Welsh rival Llywelyn ap Gruffudd, leading to the site being burnt in 1270 and taken over by royal officials in 1271. Despite these interruptions, Gilbert successfully completed the castle and took control of the region. The core of Caerphilly Castle, including the castle's luxurious accommodation, was built on what became a central island, surrounding by several artificial lakes, a design Gilbert probably derived from that at Kenilworth. The dams for these lakes were further fortified, and an island to the west provided additional protection. The concentric rings of walls inspired Edward I's castles in North Wales, and proved what historian Norman Pounds has termed "a turning point in the history of the castle in Britain".
The castle was attacked during the Madog ap Llywelyn revolt of 1294, the Llywelyn Bren uprising in 1316 and during the overthrow of Edward II in 1326–27. In the late 15th century, however, it fell into decline and by the 16th century the lakes had drained away and the walls were robbed of their stone. The Marquesses of Bute acquired the property in 1776 and under the third and fourth Marquesses extensive restoration took place. In 1950 the castle and grounds were given to the state and the water defences were re-flooded. In the 21st century, the Welsh heritage agency Cadw manages the site as a tourist attraction.
18th – 21st centuries
The Marquesses of Bute acquired the castle in 1776. John Stuart, the first marquess, took steps to protect the ruins. His great-grandson John Crichton-Stuart, the third marquess, was immensely rich as the result of the family's holdings in the South Wales coalfields and was passionately interested in the medieval period. He had the site fully surveyed by the architect William Frame, and reroofed the great hall in the 1870s. The marquess began a process of buying back leasehold properties around the castle with the intent of clearing back the town houses that had been built up to the edge of the site.
The fourth marquess, John Crichton-Stuart, was an enthusiastic restorer and builder and commissioned a major restoration project between 1928 and 1939. The stonework was carefully repaired, with moulds made to recreate missing pieces. The Inner East Gatehouse was rebuilt, along with several of the other towers. The marquess carried out landscaping work, with the intent of eventually re-flooding the lakes, and thanks to several decades of purchases was finally able to demolish the local houses encroaching on the view of the castle.
By 1947, when John Crichton-Stuart, the fifth marquess, inherited the castle, the Bute family had divested itself of most of its land in South Wales. John sold off the family's remaining property interests and in 1950 he gave Caerphilly Castle to the state. The lakes were re-flooded and the final stages of the restoration work were completed in the 1950s and 1960s. In the 21st century the castle is managed by the Welsh heritage agency Cadw as a tourist attraction. In 2006, the castle saw 90,914 visitors. It is protected as a scheduled monument and as a grade I listed building.