Hugh had brought with him, launched a coup d'état during the wedding festivities. Hugh managed to flee the castle by sliding down a rope and rejoining his army, but Marozia was imprisoned until her death a few years later. Hugh's power in Italy was damaged but not destroyed by these events. To strengthen his hand in the affairs of Milan, he tonsured his younger illegitimate son, Tebald, to groom him for the position of Archbishop of Milan; however, the ancient cleric, Arderic, whom he installed pro tem lived another twenty-two years. He continued to organise the fight against the Magyars and the Andalusian pirates based at Fraxinet in Provence. Active, if sometimes dubious, diplomacy paid off. He concluded a treaty with Rudolph in 933 by which Rudolf abandoned his claims to Italy in return for being handed Provence over the heads of Louis the Blind's heirs and the marriage of Rudolph's daughter Adelaide to Hugh's son Lothair. Friendly relations were maintained with the Byzantine Empire and, in 942, Hugh even came to terms with Alberic, who married one of Hugh's daughters. Within the kingdom, Hugh intensified his existing habit of giving any available offices or lands to relations, including his numerous legitimate and illegitimate progeny, and a small circle of old and trusted friends. The effect this had on Italian nobles who saw this as a threat eventually resulted in rebellion. In 941, Hugh expelled Berengar of Ivrea from Italy and abolished the March of Ivrea. In 945, Berengar returned from exile in Germany and defeated Hugh in battle. By a diet Berengar held at Milan, Hugh was deposed, though he managed to come to terms by which he nominally kept the crown and the title rex (king) but returned to Provence, leaving Lothair as nominal king, but with all real power in Berengar's hands. Hugh retired to Provence, but continued to carry the royal title until 947. Family By four wives and at least four mistresses, he left eight children. With his first wife, Willa of Provence, Hugh had no children. His only legitimate children were both from his second wife, Alda or Hilda, of German origin, whom he married before 924. Alda of Vienne, who married Alberic II of Spoleto Lothair, Hugh's successor. By his third wife, Marozia, and his fourth, Bertha of Swabia, widow of Rudolph II, Hugh had no children. Hugh had several illegitimate children with