The governor of Milan was a political and military office of the Duchy of Milan, the title of the representatives of the foreign sovereigns who held dominion over the Milanese area, substantially from the 16th century until the Unification of Italy.
The first Spanish Governor was appointed after the death of the last Duke of the House of Sforza, Francesco II.
The figure of the Governor of Milan had already been established in 1526, following the Battle of Pavia and the passage of the duchy from the Kingdom of France, which invaded the Duchy in 1499, to the Sforza, no more as an independent state as it was during the centuries old rule of the Milanese dynasties, but now under the protection of Charles V. Milan fell to the Austrian army on September 26, 1706 during the War of the Spanish Succession.
The Austrian rule was confirmed by the Treaty of Rastatt.
The Austrians abandoned Milan after the Battle of Marengo and the duchy was incorporated again in the Cisalpine Republic, which became the Italian Republic in 1802 and the Kingdom of Italy in 1805.