The Duchy of Milan (Italian: Ducato di Milano; Lombard: Ducaa de Milan) was a state in Northern Italy, created in 1395 by Gian Galeazzo Visconti, then the lord of Milan, and a member of the important Visconti family, which had been ruling the city since 1277. At that time, it included twenty-six towns and the wide rural area of the middle Padan Plain east of the hills of Montferrat. During much of its existence, it was wedged between Savoy to the west, Republic of Venice to the east, the Swiss Confederacy to the north, and separated from the Mediterranean by the Republic of Genoa to the south. The duchy was at its largest at the beginning of the 15th century, at which time it included almost all of what is now Lombardy and parts of what are now Piedmont, Veneto, Tuscany, and Emilia-Romagna.
Under the House of Sforza, Milan experienced a period of great prosperity with the introduction of the silk industry, becoming one of the wealthiest states during the Renaissance. From the late 15th century, the Duchy of Milan was contested between the forces of the Habsburg Monarchy and the Kingdom of France. It was ruled by Habsburg Spain from 1556 and it passed to Habsburg Austria in 1707 during the War of the Spanish Succession. The duchy remained an Austrian possession until 1796 when a French army under Napoleon Bonaparte conquered it, and it ceased to exist a year later as a result of the Treaty of Campo Formio, when Austria ceded it to the new Cisalpine Republic.