some time after this accord because the Earl of Lincoln commanded an English force to take the castle on 10 May 1277. Before they could complete their encirclement of the royal centre they learnt that the small garrison inside had abandoned the cause and burnt the castle. Madog II was forced to flee to the protection of Gwynedd. He was killed in battle while campaigning alongside Llywelyn ap Gruffudd later that same year. The castle of Dinas Brân would be reduced, the dramatic ruins of which may still be seen today. His surviving brothers Llywelyn Fychan and Gruffudd Fychan I accepted the overlordship of England and the realm was divided between them. Special provision was also made for the two sons of Madog II. However, in 1282, during the final campaign of Llywelyn ap Gruffudd, all of the rulers of Powys Fadog would once again turn against England in a final conflict during which Llywelyn ap Gruffudd, Llywelyn Fychan and the two sons of Madog II would die. Under the terms of the Statute of Rhuddlan in 1284 all of the remaining former princely titles and territories in Wales were abolished. Gruffydd Fychan (the brother of Madog II and last heir to the throne of Powys Fadog) was pardoned but reduced in status to that of a minor local noble or uchelwyr. His direct descendant, Owain Glyndŵr, would become the leader of a later Welsh rebellion in 1400. The territory of Powys Fadog was broken up into a series of lordships based on the former cantrefi. Under the Laws of Wales Acts these marcher lordships were merged with other adjacent lands formerly part of Gwynedd and incorporated into new administrative counties; the cantrefi of Maelor, Nanheudwy, Iâl, Cynllaith and Mochnant Is Rhaeadr going to Denbighshire and Maelor Saesneg forming the Wrexham exclave of Flintshire. This situation was maintained until the re-organisation of local government in Wales in 1974. Princes of Powys Fadog and later Lords of Glyn Dyfrdwy 1160–1191 Gruffydd Maelor 1191–1236 Madog ap Gruffydd Maelor 1236–1269 Gruffydd II ap Madog, Lord of Dinas Brân 1269–1277 Madog II ap Gruffydd, Lord of Dinas Brân 1277–1289 Gruffydd Fychan I, Lord of Yale and Edernion, which included Glyndyfrdwy 1289–1304 Madog Crypl, Lord of Glyndyfrdwy and Lord of Cynllaith Owain 1304–c.1343 Gruffydd of Rhuddalt, Lord of Glyndyfrdwy and Lord of Cynllaith Owain c.1343–1369 Gruffydd Fychan II, Lord of Glyndyfrdwy and Lord of Cynllaith