In May 1859 Austria suffered a military defeat at the Battle of Varese and in June at Magenta against the combined forces of France and Sardinia. The emperor refused to acknowledge the seriousness of the situation which was causing great hardship at home, and took over direct command of the army, though not a professional soldier. Later that month a further defeat at Solférino sealed Austria's fate, and the emperor found himself having to accept Napoleon's terms at Villafranca. Austria agreed to cede Lombardy, and the rulers of the central Italian states were to be restored. However the latter never happened, and the following year in plebiscites, all joined the Kingdom of Sardinia-Piedmont. By April 1860 Garibaldi had invaded and quickly subdued Sicily, and by February 1861 the Kingdom of the Two Sicilies ceased to exist, Francis and Maria fled to Austria.