 As an effect the complicated fiscal division of both separate duchies, Holstein and Schleswig, with shares of each party scattered in both duchies, provided them with a condominial government binding both together, partially superseding their legally different affiliation as Holy Roman and Danish fiefs.In 1864, following the Second Schleswig War, the Duchies of Schleswig and Holstein were ceded by the Danish King and were ruled in a joint condominium by Austria and Prussia.Following the defeat of Austria in the Austro-Prussian War in 1866, they were annexed by Prussia and were formed into the new Prussian Province of Schleswig-Holstein.