Madog ap Llywelyn
Madog was the son of Llywelyn ap Maredudd, the last vassal Lord of Meirionydd who had been deprived of his patrimony in 1256 for opposing Llywelyn ap Gruffudd the Prince of Wales at the Battle of Bryn Derwin. Llywelyn ap Maredudd had lived out his days in exile in England dying in 1263. His eldest son, Madog, who had probably been born in exile, is known to have received substantial monetary gifts from King Edward I of England in 1277 and used this money to sue the Prince of Wales in 1278 in an attempt to have his father's cantref of Meirionydd returned to him. It appears that Madog returned to Gwynedd after the death of Llywelyn ap Gruffudd in 1282 and received lands from the King of England in Anglesey.
 Revolt against King Edward I
In the autumn of 1294, Madog put himself at the head of a national revolt in response to the actions of new royal administrators in north and west Wales and the imposition of taxes such as that levied on one fifteenth of all moveables. As a royal prince descended directly from Owain Gwynedd and the fifth cousin of the last Prince of Aberffraw (Dafydd ap Gruffudd, the executed brother of Llywelyn), Madog declared himself to be the lawful successor and assumed the royal titles of his predecessors including "Prince of Wales" (an example of which can be seen in the so-called Penmachno Document). The uprising quickly spread to south Wales led by Cynan ap Maredudd, Maelgwn ap Rhys, and Morgan ap Maredudd of Gwynllwg in Glamorgan.
 Edward's fortresses attacked
Caernarfon was overrun by Madog's forces and the castle occupied, as were the castles at Hawarden, Ruthin, and Denbigh. Criccieth Castle was besieged by Madog's forces for several months, as was Harlech. Morlais castle was captured under the aegis of Morgan in the south, and Cynan ap Maredudd besieged the castle at Builth for a period of six weeks. Half the town of Caerphilly was burnt - although the castle itself held out - and, further south, Kenfig castle was sacked.
In north Wales, attempts were made by many English landowners to retrieve the situation. The lord of Denbigh, Henry de Lacy led a march to Denbigh after the castle there was beiseged; however, he was ambushed outside the town on 11 November, and in the ensuing battle his force was routed by the rebels. In north-east Wales, Reginald de Grey was more successful, stationing substantial garrisons at Flint and Rhuddlan - neither castle fell to the rebels, though Flint was subjected to a lengthy siege. Many other castles across Wales were besieged and several towns burnt.
In December 1294 King Edward I of England led an army into north Wales to quell the revolt, stopping at Wrexham, Denbigh, Abergele, and elsewhere on his way to Conwy Castle, which he reached shortly before Christmas. His campaign was timely, for several castles remained in serious danger - Harlech Castle was defended at one point by just 37 men and Edwand himself was besieged at Conwy Castle until he was relieved by his navy in 1295.
 Battle of Maes Moydog and defeat
A final battle between Madog's men and those of the English crown occurred at the battle of Maes Moydog in Powys in 1295. The Welsh army were defeated tactically when they were ambushed by the Earl of Warwick. The Welsh regained their composure and attempted to destroy the English cavalry by using the "porcupine" pike men formation, or schiltron, a formation favoured by the Scots armies against English knights. In the process they were showered with arrows from English archers and suffered very heavy losses. Madog barely escaped with his life and was a fugitive until his unconditional surrender to John de Havering in Snowdonia in late July or early August 1295. He was subsequently taken to London and all that is known of his fate is that he did not suffer the supreme penalty; he was still alive in 1312 and was survived by his sons.
The revolt of 1294-95 elicited a harsh response from Edward I in the form of humiliating and punitive ordinances further restricting the civil rights and economic and social opportunities of the Welsh. However, it was not long before Llywelyn Bren, Lord of Senghenydd, led a second rebellion, aided by some of the more prominent Marcher Lords in 1316.
 Issue and succession
Madog was not the last of the House of Cunedda; two sons survived him. Additionally, the children of Rhodri ap Gruffudd, a brother of Llywelyn the Last, survived in exile. A grandson of Rhodri, Owain ap Thomas, or Owain Lawgoch, was later to proclaim himself Prince of Wales. The sons of Dafydd Goch also laid claim to the title, although illegitimately.
Madog ap Llywelyn is known to have had the following children:
- John Griffiths, 'The Revolt of Madog ap Llywelyn, 1294-5', Transactions of the Caernarfonshire Historical Society Vol. 16, pp. 12–24 (1955).
- John Edward Lloyd (1911) A history of Wales from the earliest times to the Edwardian conquest (Longmans, Green & Co.)
- J. Beverley Smith (1998) Llywelyn ap Gruffudd, Tywysog Cymru.
- National Library of Wales, 'Madog ap Llywelyn', 
Dafydd ap Gruffydd
|Titular Prince of Gwynedd