The Treaty of Schönbrunn (; ), sometimes known as the Peace of Schönbrunn or the Treaty of Vienna, was signed between France and Austria at Schönbrunn Palace near Vienna on 14 October 1809. The treaty ended the Fifth Coalition during the Napoleonic Wars, after Austria had been defeated at the decisive Battle of Wagram on 5–6 July. Prelude During the Peninsular War and the Spanish resistance against Napoleon, Austria had tried to reverse the 1805 Peace of Pressburg by sparking national uprisings in the French-occupied territories of Central Europe (most notably the Tyrolean Rebellion against Napoleon's Bavarian allies). These attempts ultimately failed, after French forces occupied Vienna in May 1809. The Austrians under Archduke Charles were able to repulse them at the Battle of Aspern on 21-22 May; however, Napoleon withdrew his forces and crushed Charles' army at Wagram a few weeks later. The archduke had to sign the Armistice of Znaim on 12 July. In October, Austrian Foreign Minister Johann Philipp Stadion was superseded by Klemens von Metternich. Terms France imposed harsh peace terms: Austria had to cede the Duchy of Salzburg to Bavaria and lost its access to the Adriatic Sea by waiving the Littoral territories of Gorizia and Gradisca and the Imperial Free City of Trieste, together with Carniola, the March of Istria, western ("Upper") Carinthia with East Tyrol, and the Croatian lands southwest of the river Sava to the French Empire (see Illyrian Provinces). West Galicia was ceded to the Duchy of Warsaw, and Tarnopol district to the Russian Empire. Austria recognized Napoleon's previous conquests from other nations as well as the rule of his brother Joseph Bonaparte as King of Spain. Austria also paid to France a large indemnity and the Austrian army was reduced to 150,000 men - a promise not fulfilled. The Graz Schlossberg fortress, whose garrison had firmly resisted the French occupation forces, was largely demolished. Austria also had to apply Napoleon's Continental System, as Britain remained at war with France. One contemporary British view on the treaty was: Though considerably weakened, Austria remained a European great power. Emperor Francis I approached to the French by marrying his daughter Marie Louise off to Napoleon (whom she at first detested) in 1810. As a result of Metternich's change of policies, the Austrian forces joined the French invasion of Russia in 1812. Assassination attempt During the negotiations at Schönbrunn, Napoleon narrowly escaped an attempt