William VIII struggled to get the church, the townspeople and neighbouring lords to recognise the legitimacy of his second marriage and his son.
[2] William IX succeeded his father in 1202 in accordance with the latter's final will and testament (dated that same year) and in contravention of the marriage treaty with Eudokia.
[3] In 1204, Mary married the divorced King Peter II of Aragon, who thus obtained a claim on Montpellier.
Pope Innocent III decided in favour of Peter, legitimising his marriage to Mary and their children, in January 1213.
He decided against William, rejecting his father's marriage to Agnes as adulterous and declaring him illegitimate, in April 1213.