In a lightning campaign, Napoleon managed to knock Sardinia out of the war, and then moved on the Duchy of Milan, controlled by the Habsburg forces. On 9 May Archduke Ferdinand, the Austrian governor of Milan, retired with his family to Bergamo, in Venetian territory. Six days later, after winning the Battle of Lodi, Napoleon entered Milan, and forced King Victor Amadeus III of Sardinia to sign the humiliating Treaty of Paris, while the Habsburg forces withdrew to defend the Bishopric of Trent. On 17 May the Duchy of Modena likewise sought an armistice with the French.