 Llywelyn's amendment to Welsh law favouring legitimate children in a Church-sanctioned marriage mirrored the earlier efforts of the Lord Rhys, Prince of Deheubarth, in designating Gruffydd ap Rhys II as his heir over those of his illegitimate eldest son, Maelgwn ap Rhys.In both cases, favouring legitimate children born in a Church sanctioned marriage would facilitate better relations between their sons and the wider Anglo-Norman polity and Catholic Church by removing any "stigma" of illegitimacy.Dafydd's older but illegitimate brother, Gruffydd, was therefore excluded as the primary heir of Llywelyn, though would be given lands to rule.