The Grand Duchy of Luxemburg (German: Großherzogtum Luxemburg) was established after the defeat of Napoleon in 1815, Luxemburg was disputed between Prussia and the Netherlands. The Congress of Vienna formed Luxembourg as a Grand Duchy within the German Confederation in personal union with the Netherlands, being at the same time a part of the Netherlands and ruled as one of its provinces, with a Confederate fortress manned by Prussian troops. This situation was revised by the 1839 First Treaty of London, from which date Luxembourg's full independence is reckoned. During World War I, Luxemburg was invaded and occupied by Germany, but was allowed to maintain its independence and political mechanisms until after the war. After the war the Grand Duchy was officially annexed by Germany as a full member state of the Reich.