Gwynedd's death led to the splitting of Gwynedd between his sons, while Rhys made Deheubarth dominant in Wales for a time. Dominance of Gwynedd and Edwardian conquest: 1216–1283 Out of the power struggle in Gwynedd eventually arose one of the greatest of Welsh leaders, Llywelyn ab Iorwerth, also known as Llywelyn Fawr (the Great), who was sole ruler of Gwynedd by 1200 and by his death in 1240 was effectively ruler of much of Wales. Llywelyn made his 'capital' and headquarters at Abergwyngregyn on the north coast, overlooking the Menai Strait. In 1200 Llywelyn ap Iorwerth (Llywelyn the Great) became King of Gwynedd and agreed to a treaty of peace with King John of England, marrying his illegitimate daughter Joan. 1208 Llywelyn claimed the Kingdom of Powys after the arrest of Gwenwynwyn ap Owain. Powys was left vulnerable following Gwenwynwyn's arrest by King John, who disapproved of his attacks on Marcher Lords of the South. Although John invaded parts of Gwynedd in 1211, these attacks were rebuffed in 1212 by Llywelyn. Charters of the Welsh Princes included in the Magna Carta of 1215 was the first document which included English and Welsh law, including reference to common acceptance of the lawful judgement of peers. Chapter 56: The return of lands and liberties to Welshmen if those lands and liberties had been taken by English (and vice versa) without a law-abiding judgement of their peers. Chapter 57: The return of Gruffydd ap Llywelyn, the illegitimate son of Llywelyn ap Iorwerth (Llywelyn the Great) along with other Welsh hostages who were originally taken for "peace" and "good". After the death of John in 1218, Llywelyn and King Henry II agreed to the treaty of Worcester which again confirmed Llywelyn's right to Wales until his death in 1240. His son Dafydd ap Llywelyn followed him as ruler of Gwynedd, but King Henry III of England would not allow him to inherit his father's position elsewhere in Wales. War broke out in 1241 and then again in 1245, and the issue was still in the balance when Dafydd died suddenly at Abergwyngregyn, without leaving an heir in early 1246. Llywelyn the Great's other son, Gruffudd had been killed trying to escape from the Tower of London in 1244. Gruffudd had left four sons, and a period of internal conflict between three of these ended in the rise to power of Llywelyn ap Gruffudd (also