The County of Melgueil (Occitan: Melguelh, modern Mauguio) was a fief of first the Carolingian Emperor, then the King of France, and finally (1085) the Papacy during the Middle Ages. Counts probably sat at Melgueil from the time of the Visigoths. 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. Bertrand refused to recognise his disinheritance and pledged homage as Count of Melgueil to Alfonso II of Aragon in 1172. The county fell to the Toulouse in 1190 and was annexed to the French crown in 1213, during the Albigensian Crusade. At the Fourth Council of the Lateran in 1215 it was given to the Diocese of Maguelonne and secular and ecclesiastical authority were merged.
List of counts
Aigulf (c. 750)
Amic (???–778), son of Agilulf
Robert (778–???)
Adolf
Ernest
Eberard (???–812)
Bera (812–820), also Count of Barcelona
Rampo (820–826), also Count of Barcelona
Bernard of Septimania (826–832), also Margrave of Septimania
Berengar the Wise (832–835), also Count of Toulouse
Bernard of Septimania (836–844), also Margrave of Septimania
Sunifred (844–848), also Count of Barcelona
William of Septimania (848–850), also Margrave of Septimania
Aleran (850–852), also Count of Barcelona
Isembart (850–852), also Count of Barcelona
Odalric (852–858), also Margrave of Septimania
Humfrid (858–864), also Margrave of Gothia
Bernard of Gothia (865–878), also Margrave of Gothia
Guillermona (c.878–920), married to Robert of Magalona
Bernard I (c.920–930), son of Guillermona
Berengar (c.930–950), son of Bernard I
Bernard II, Count of Melgueil (c. 950–988), son of Berengar
N.N. (c.988–989), son of Bernard II
Bernard III, Count of Melgueil (c. 989–1055), son of the son of Bernard II
Raymond I (c.1055–1079), son of Bernard III
Peter, Count of Melgueil (1079 – after 1085), son of Raymond I
Raymond II (????–1120), son of Peter
Bernard IV (1120–????), son of Raymond II
Beatrice (c.1130–c.1190), daughter of Bernard IV, under the regency of her cousin William VI of Montpellier
Berengar Raymond (1135–1144), first husband of Beatrice, also Count of Provence
Bernard V of Pelet (1146–1172), second husband of Beatrice, also Lord of Alès
Ermessenda (1170-1176), daughter of the previous
Raymond VI (1173-1190), husband of the previous, also Count of Toulouse.
On the death of Beatrice the county was disputed. In 1172 it was divided. In 1190 it was reunited.


