The Treaty of Vienna (Danish: Freden i Wien; German: Frieden von Wien) was a peace treaty signed on 30 October 1864 in Vienna between the Austrian Empire, the Kingdom of Prussia, and the Kingdom of Denmark. The treaty ended the Second War of Schleswig. Denmark ceded the Duchy of Schleswig (except for the island of Ærø, which remained Danish) the Duchy of Holstein and the Duchy of Lauenburg. They would be jointly governed by Prussia and Austria in a condominium. A subsequent treaty between Austria and Prussia on August 14, 1865 known as the Gastein Convention provided that Prussia would administer Schleswig and Austria would similarly govern Holstein. Austria also sold its rights over Lauenburg to Prussia. Disputes over the administration of Schleswig and Holstein would lead to the 1866 Austro-Prussian War. When that war was over, Prussia annexed Schleswig and Holstein.