With the death of Rhodri Mawr, the kingdom of Gwynedd passed to his eldest son Anarawd ap Rhodri. Rhodri's second son Cadell ap Rhodri, however, looked outside Gwynedd's traditional borders and took possession of the Dark Ages kingdom of Dyfed by the late 9th century, establishing his capital at the citadel of Dinefwr. Cadell ap Rhodri's descendants are designated Dinefwr after the citadel from which they would rule Dyfed. The Dinefwr dynasty under king Hywel Dda would unite Dyfed and Seisyllwg into the kingdom of Deheubarth in the early 10th century. The Dinefwr dynasty would rule in Deheubarth until their conquest by the Anglo-Normans in the 13th century. This branch would compete with House Aberffraw for supremacy and influence in Wales throughout the 10th, 11th, and 12th century, with Powys variously ruled between them. Eventually, a cadet branch of Dinefwr would establish itself in Powys by the mid 11th century, designated Mathrafal after the castle there.