During the Napoleonic Wars, after the Habsburgs ceded Tyrol to Napoleon's Bavarian allies in 1805, the Hofburg became a residence of Bavarian King Maximilian I Joseph (1756–1825). In 1809, the South Tyrolean innkeeper Andreas Hofer led an uprising against the occupying Bavarian administration, and following the successful third battle of Bergisel on 13 August 1809, Hofer moved into the Hofburg for two months, serving as the leader of Tyrol. After the Congress of Vienna, Tyrol was returned to Austria. In 1858, the last major reorganisation of the imperial apartments took place following the model of Schönbrunn Palace. Vienna court sculptor August La Vigne was commissioned to design the residential area in the Rococo style. Many of the furnishing added at that time are still in the imperial rooms today.