 Ferdinand also served as his brother's deputy in the Holy Roman Empire during his brother's many absences, and in 1531 was elected King of the Romans, making him Charles's designated heir in the empire.Charles abdicated in 1556 and Ferdinand adopted the title "Emperor elect", with the ratification of the Imperial diet taking place in 1558, while Spain, the Spanish Empire, Naples, Sicily, Milan, the Netherlands, and Franche-Comté went to Philip, son of Charles.According to the terms set at the First Congress of Vienna in 1515, Ferdinand married Anne Jagiellonica, daughter of King Vladislaus II of Bohemia and Hungary on 22 July 1515.