Conflict between Denmark and Prussia over Schleswig-Holstein .
In the 1840s the Danish-speaking population of northern Schleswig, supported by the Danish government, wanted to detach Schleswig from Holstein and incorporate it with Denmark, whereas the German-speaking majority of the two duchies wanted to combine them as a state within the German Confederation . An 1848 uprising by Germans in the region was aided by the Prussian army in a war that ousted Denmark's troops (184851). The agreements of 185152 restored the region's status quo. In 1863 a renewed attempt by Denmark to annex Schleswig caused Prussia and Austria to declare war in 1864. After the Danish defeat at Dybbøl and the occupation of Jutland, Denmark was forced to surrender all of Schleswig-Holstein to Prussia and Austria.