He and his family were forced to flee Florence on 27 April 1859, with the outbreak of a revolution inspired by the outbreak of a war by France and Sardinia-Piedmont against Austria as part of the unification of Italy. The family took refuge in Austria. After the end of the war, Leopold II abdicated on 21 July and Ferdinand succeeded him as Grand Duke. Ferdinand proved unable to return to Florence to claim his throne, and an elected Tuscan National Assembly formally deposed him only a month later, on 16 August. Ferdinand still hoped to recover his throne, as both France and Austria had promised to recognize his rights to it in the Armistice of Villafranca. However, neither power was willing to take any steps to bring about his restoration; Sardinia would annex Tuscany on 22 March 1860, and with Austria recognizing the new Kingdom of Italy after the Third War of Independence in 1866, Ferdinand's hopes to reclaim the throne were ended.