Maximilian's marriage (1477) to Mary of Burgundy involved him in defense of her inheritance—including Burgundy, the Netherland provinces, and Luxembourg—against the designs of King Louis XI of France. By Mary's death (1482), Maximilian had secured Franche-Comté, the county of Artois, and the Low Countries, but he yielded a sizable part of French-speaking Burgundy in the Treaty of Arras of 1483 (see Arras, Treaty of). In 1486 he was elected king of the Romans (i.e., emperor-elect) and assumed an increasing share of the imperial duties until his father's death.
Louis XI's successor, Charles VIII, repudiated the treaty; moreover, instead of marrying Maximilian's daughter Margaret of Austria, he forced Anne of Brittany into marrying him (1491), disregarding her marriage by proxy to the widowed Maximilian the preceding year. Renewed warfare with France was settled temporarily by the Treaty of Senlis (1493), which basically retained the status quo; but the Burgundian question remained a key issue in Hapsburg relations with the French crown.
Maximilian became embroiled in the Italian Wars in order to regain the rest of the Burgundian inheritance and also to expand Hapsburg dominions and check any extension of French power. His Italian campaigns also afforded him an opportunity to aid Ludovico Sforza, whose niece he had married (1493) and whom, in exchange for a dowry, he had invested with the duchy of Milan (also claimed by Louis XII of France). His involvement in Italy led him to join the League of Cambrai (see Cambrai, League of) and later the Holy League. Both alliances cost him money, of which he was chronically short, and forced him to borrow heavily from the Fugger family. Moreover, his interference in Italy encouraged the French to exert pressure on the Swiss to turn a jurisdictional dispute with imperial authorities into an open war (1499), which resulted in an imperial defeat.
Despite these difficulties, Maximilian made the Hapsburgs into a powerful dynasty through his astute marriage diplomacy. The marriage of his son Philip (see Philip I of Castile) to Joanna, the heiress of Ferdinand and Isabella, eventually gave his grandson, the future Holy Roman Emperor Charles V, one of the largest territorial inheritances in history. The double marriage of Maximilian's grandson and granddaughter to the daughter and son of King Uladislaus II of Hungary (1516) ultimately assured Hapsburg succession to the Hungarian and Bohemian thrones and ascendancy in central Europe.