Dinefwr Castle (sometimes anglicised as Dynevor) is a Welsh castle overlooking the River Tywi near the town of Llandeilo, Carmarthenshire, Wales. It lies on a ridge on the northern bank of the Tywi, with a steep drop of one hundred feet to the river. Dinefwr was the chief seat of the Kingdom of Deheubarth. The castle is a Grade I listed building. 
The present castle is entered via a massive door protected by a restored length of battlement. The short path from the car park reveals impressive views of the Towy valley. The door admits the visitor to the main space enclosed by the walls, from which there are several stairs to the main battlements and towers. A narrow spiral staircase leads to a high tower, which gives extensive views of the deer park to the north and the Tywi valley to the south and west. The castle keep is entered via the cellar at its base, but access to the circular walkway at the top can only be made via the battlement walk. Details such as the well and several garderobes are visible in the structure. There is a path around the base of the main structure to the north.
Tradition relates that a castle was first constructed on this site by Rhodri the Great, but there are no remains from this period. Dinefwr later became the chief seat of Rhodri's grandson Hywel Dda, first ruler of Deheubarth and later king of most of Wales. Rhys ap Gruffydd, ruler of Deheubarth from 1155 to 1197, is thought to have rebuilt the castle. Giraldus Cambrensis tells a story about a plan by King Henry II of England to assault the castle during a campaign against Rhys. One of Henry's most trusted followers was sent on reconnaissance, guided by a local Welsh cleric, who was asked to lead him to the castle by the easiest route, but instead took the most difficult route he could find, ending the performance by stopping to eat grass with the explanation that this was the diet of the local people in times of hardship. The planned attack was duly abandoned.
Rhys ap Gruffydd also built the spectacular castle at Carreg Cennen, about four miles away to the south. It is not visible from Dynefwr, but Dryslwyn Castle can just be seen on a hill blocking the Tywi valley to the south-west. Rhys also founded two religious houses during this period. Talley Abbey was the first Premonstratensian abbey in Wales, while Llanllyr was a Cistercian nunnery, only the second nunnery to be founded in Wales and the first to prosper.
On Rhys ap Gruffydd's death the castle passed to his son Rhys Gryg, and the earliest parts of the present castle are thought to derive from this period. Llywelyn the Great of Gwynedd was now extending his influence to this area, and Rhys, finding himself unable to resist, dismantled the castle. Llywelyn however had it restored and held it until his death in 1240. In 1255 Llywelyn the Last gave Dinefwr to Rhys Fychan, then later gave it to Maredudd ap Rhys before later returning it to Rhys Fychan. Maredydd now allied himself to King Edward I of England, and helped Edward capture Dinefwr in 1277. Maredudd had apparently been promised Dinefwr in return for his help, but Edward did not keep his promise and had Maredudd executed in 1291.
The castle now came into English hands, though it is recorded to have been burnt during the rebellion of Llywelyn Bren in 1316. In 1317 it was given to Hugh Despenser, the king's favourite. It was unsuccessfully besieged by the forces of Owain Glyndŵr in 1403. Towards the end of the 15th century the castle was held by Sir Rhys ap Thomas, who carried out extensive rebuilding. In 1531 his grandson Rhys ap Gruffydd was executed for treason and the castle was confiscated by the crown, though the family were later able to recover it. In 1660 Newton House was built nearby and the castle keep modified as a summer house. The remains of the large windows can be seen at the top of the keep, but it burned down in the 18th century. The castle is now owned by the Wildlife Trust of South and West Wales and managed by CADW on their behalf.
The castle is now partially owned by the Wildlife Trust of South and West Wales (who do not charge for entry) and is managed by Cadw but lies within Dinefwr Park, which is owned by the National Trust. Visitors who wish to see the castle and are driving there, may park in the town and walk up to the Castle using the free Wildlife Trust of South and West Wales access route. If visitors walk or park in the National Trust site and are not National Trust, Wildlife Trust of South and West Wales or Cadw members there is a site entrance charge. There is a small free car park near the castle for disabled badge holders, but it can only be reached by a rough track through a field. Permission can be gained at the National Trust office to drive over the field up to the castle, weather and conditions permitting.
- List of Cadw properties
- List of Castles in Great Britain and Ireland
- List of castles in Wales
- Grade I listed buildings in Carmarthenshire
- Grade II* listed buildings in Carmarthenshire
- "Old Dynevor Castle,dynevor Park, Llandeilo". British Listed Buildings. Retrieved 25 August 2014.
- "(Dinefwr / Dynefor) Castle Woods – Llandeilo | | The Wildlife Trust of South and West WalesThe Wildlife Trust of South and West Wales". Welshwildlife.org. Retrieved 2012-04-29.
|Wikimedia Commons has media related to Dinefwr Castle.|
- DINEFWR CASTLE;DYNEFOR CASTLE, LLANDEILO Royal Commission on the Ancient and Historical Monuments of Wales
- Abandoned Communities .... Dinefwr and Dryslwyn castles and the towns close to them