Dafydd ap Gruffydd was the last prince of an independent Wales before its conquest by the English. Dafydd, who was born circa 1238 was the son Gruffydd ap Llywelyn, himself the son of Llywelyn the Great, and Senena ferch Rhodri.
When his father was captured by his uncle, Dafydd ap Llywelyn in 1240, Dafydd's mother Senena appealed to the King Henry III of England for help. Dafydd, along with his younger brother, Rhodri, was given into the custody of Henry as hostages as part of an agreement. Henry did not release Gruffydd as arranged, he was sent to the Tower of London, and was killed in a fall while attempting to escape in 1244.
By 1255, Dafydd had been allowed to return to Gwynedd, in collusion with his brother, Owain, he rebelled against his older brother, Llywelyn the Last, then Prince of Gwynedd who defeated them at the Battle of Bryn Derwin. Dafydd was captured and imprisoned, but the following year Llywelyn released him and restored him to favour, after which he aided his brother to retake the Perfeddwlad from the English. He rebelled against his his rule again in 1263, when he joined Henry III in an attack on Llywelyn.
Following Henry III's acknowledgment of Llywelyn as Prince of Wales in 1267, Dafydd was yet again forgiven and restored to favour by his brother, but in 1274, he joined with Henry's son and successor King Edward I, to challenge Llywelyn's authority yet again, he plotted Llywelyn's death with Prince Gwenwynwyn of Powys. The planned assassination attempt, however, never occured, bad weather flooded the roads from Powys to Gwynedd, rendering them impassable. In October of that year Llywelyn uncovered the truth of Dafydd's involvement in the aborted plot and Dafydd fled to seek refuge in England, where he married King Edward's cousin, Elizabeth de Ferres. After the Treaty of Aberconwy in 1277, which gave Dafydd two cantrefs in the Perfeddwlad, the brothers were finally reconciled.
Dafydd attacked Hawarden Castle on Palm Sunday, 21 March 1282, he then laid siege to Rhuddlan, which led to war with Edward. Llywelyn, who had not initially been involved in the revolt, nevertheless felt obliged to side with his brother and led the Welsh resistance against a further English invasion.
The English led a force from Anglesey across a newly completed pontoon bridge, as they reached the mainland they were attacked by the Welsh. The English fled back over the bridge as it began to collapse due to sabotage by the Welsh, resulting in the death by drowning of hundreds of English soldiers. The Archbishop of Canterbury attempted to mediate, Llywelyn was offered an earldom and estates in England if he would surrender Wales to Edward, while Dafydd was to go on crusade. Llywelyn proudly replied he would not abandon the people whom his ancestors had protected since 'the days of Kamber son of Brutus' and declined Edward's offer. Llywelyn attempted to rally support in mid and south Wales, leaving Dafydd to undertake the defence of Gwynedd. At the Battle of Orewin Bridge fought on 11 December 1282, at Builth Wells, he was slain while separated from his army.
Dafydd succeeded his brother as Prince of Gwynedd but ruled for only a few months after Llywelyn's death, he did not obtain the support from the Welsh which his brother inspired. He assumed guardianship of Llywellyn's orphaned daughter Gwenlian and continued to resist the English for several more months. By January 1283, Edward I had the heartland of Wales surrounded by a huge English army. Dafydd made Dolwyddelan, one of his strongest castles, his headquarters, where he was joined by royal refugees from Powys, Fadog and Deheubarth, including Rhys Wyndod, Rhys Ieuanc and the sons of Maredudd ab Owain.
Gascon mercenaries landed in Wales to aid the English amies. The English marched on Bangor, which was taken and destroyed. They then went on to capture to Caer-yn-Arfon and Harlech, Edward secured his victories by commencing the construction of his Welsh castles.
With the limited resources Dafydd could call upon, the passes leading to Dolwyddelan became indefensible and he moved down to the fortress of Castell y Bere, in the Dysynni valley, deep in the mountainous heart of mid Wales. In April, the castle was besieged by an English force of over 3,000 men, the small Welsh garrison, commanded by Cynfrig ap Madog, was forced to surrender on 25 April. Dafydd, however, escaped and moved north to the stronghold of Dolbadarn Castle, in the Peris Valley at the foot of Mount Snowdon.
In May 1283, he moved to the mountains above the Welsh royal palace at Abergwyngregyn.
'Those who survived fled for refuge to the inaccessible rocks of Snowdonia and David with a few followers hid himself for some months at different places and suffered hunger and cold.' At last he retreated to a bog (Nanhysglain), near Bera Mountain about four miles above Aber with his wife two sons and seven daughters. His place of retreat was known to Einion Bishop of Bangor and Gronw ab Dafydd, who basely betrayed him.'
On 22 June, Dafydd and his younger son Owain ap Dafydd were captured at Nanhysglain, a secret hiding place in a bog by Bera Mountain to the south of Abergwyngregyn. Dafydd, who was seriously wounded in the struggle to arrest him, was conveyed that night to King Edward's camp at Rhuddlan. Dafydd was taken from there to Chester. Dafydd's wife Elizabeth de Ferrers, their seven daughters, and their infant niece, Gwenllian ferch Llywelyn, were also taken prisoner at the same time.
Dafydd was taken, under guard, to Shrewsbury, where he was later hung, drawn, and quartered. He was dragged through the streets of Shrewsbury attached to a horse's tail then hanged alive, revived, then disembowelled and his entrails burned before him, his body cut into four quarters "for plotting the king's death".
Dafydd's daughter Gwladys was sent to Sixhills, a convent in Lincolnshire, where she died in 1336. His sons were both imprisoned at Bristol Castle, Llywelyn ap Dafydd died at Bristol Castle in mysterious circumstances in 1287 or 1288, while Owain ap Dafydd is last recorded alive in August 1325, Thomas Pennant stated that both boys were "drowned in the River Dee" at Holt by their guardians John de Warenne, 6th Earl of Surrey, and Roger Mortimer the younger. Dafydd may have had another (illegitimate) son, Dafydd Goch, who survived. Gwenllian was placed in a remote Priory at Sempringham where she was held captive until her death fifty-four years later.