 William IX was the eldest son of William VIII of Montpellier.His mother, Agnes (Spanish "Inés"), was related to the kings of Aragon.She was William VIII's second wife, married in 1187 after he left his first wife, Eudokia Komnene, who was the mother of his daughter and heiress, Mary.