 The counts of Melgueil were also counts of Maguelonne and Substantion from at least the time of Peter's homage to Pope Gregory VII on 27 April 1085.In 1172 Beatriu disinherited her son Bertrand and named her daughter Ermessenda her heiress.Later that year Ermessenda married the future Raymond VI of Toulouse and by her will of 1176 the county was to go to Toulouse.