Dolwyddelan Castle, which was built by Llywelyn himself. He may have been born in the old castle which occupied a rocky knoll on the valley floor. Little is known about his father, Iorwerth Drwyndwn, who died when Llywelyn was an infant. There is no record of Iorwerth having taken part in the power struggle between some of Owain Gwynedd's other sons following Owain's death, although he was the eldest surviving son. There is a tradition that he was disabled or disfigured in some way that excluded him from power. J. E. Lloyd states that Iorwerth was killed in battle at Pennant Melangell, in Powys, in 1174 during the wars deciding the succession following the death of his father. By 1175, Gwynedd had been divided between two of Llywelyn's uncles. Dafydd ab Owain held the area east of the River Conwy and Rhodri ab Owain held the west. Dafydd and Rhodri were the sons of Owain by his second marriage to Cristin verch Goronwy. This marriage was not considered valid by the church as Cristin was Owain's first cousin, a degree of relationship which according to Canon law prohibited marriage. The chronicler Gerald of Wales refers to Iorwerth Drwyndwn as the only legitimate son of Owain Gwynedd. Following Iorwerth's death, Llywelyn was, at least in the eyes of the church, the legitimate claimant to the throne of Gwynedd. Llywelyn's mother was Marared, occasionally anglicised to Margaret, daughter of Madog ap Maredudd, prince of Powys. There is evidence that after Iorwerth's death Marared married into the Corbet family of Caux in Shropshire, and Llywelyn may have spent part of his childhood there. There is in existence a grant of land from Llywelyn ab Iorworth to the monastery of Wigmore, in which Llywelyn indicates his mother was a member of the house of Corbet. Rise to power 1188–1199 In his account of his journey around Wales in 1188, Gerald mentions that the young Llywelyn was already in arms against his uncles Dafydd and Rhodri; In 1194, with the aid of his cousins Gruffudd ap Cynan and Maredudd ap Cynan, he defeated Dafydd at the Battle of Aberconwy at the mouth of the River Conwy. Rhodri died in 1195, and his lands west of the Conwy were taken over by Gruffudd and Maredudd while Llywelyn ruled the territories taken from Dafydd east of the Conwy. In 1197, Llywelyn captured Dafydd and imprisoned him. A