quality:correction, stylistic:style_transfer
Accession to the throne and the treaty of Melfi

Soon after his succession, probably in 1058, Guiscard's marriage to Alberada was annulled due to consanguinity. It was the first time that a marriage was annulled for this cause.

After separating from Alberada, Robert married Sichelgaita, the sister of Gisulf II of Salerno, and daughter Guaimar IV. In return for giving him his sister's hand, Gisulf demanded that Guiscard destroy two castles of his brother William, count of the Principate, which had encroached on Gisulf's territory.

This secured an alliance between Lombards and Normans, and opened the doors of aristocracy to the Hauteville family.

The reformist Papacy, at odds with the Holy Roman Emperor (due to the Investiture Controversy) and the Roman nobility itself, resolved to recognize the Normans and secure them as allies. Therefore, in the Treaty of Melfi, on 23 August 1059, Pope Nicholas II invested Guiscard as duke of Apulia, Calabria, and Sicily. Guiscard, now "by the Grace of God and St Peter duke of Apulia and Calabria and, if either aid me, future lord of Sicily", agreed to hold his titles and lands by annual rent of the Holy See and to maintain its cause. In the next twenty years he undertook a series of conquests, winning his Sicilian dukedom.