In 1805, the Treaty of Pressburg ended the War of the Third Coalition and forced Austria to cede Tyrol to Bavaria. For the purposes of this treaty, the Ziller Valley was considered part of Salzburg and thus remained with Austria. The people of the Ziller Valley nevertheless joined Andreas Hofer's Tyrolean Rebellion of 1809 in the Battle of the Ziller Bridge (14 May). Later that year, the insurrection was defeated and the Ziller Valley briefly became Bavarian until the Congress of Vienna in 1814/1815.