The First Schleswig War was the first round of military conflict in southern Denmark and northern Germany, contesting the issue of who should control the Duchies of Schleswig and Holstein. The war, which lasted from 1848 to 1851, also involved troops from Prussia and Sweden. Ultimately, under international pressure, the Prussians had to withdraw their forces. As a result, the war ended in a Danish victory over the rebels but a second conflict, the Second Schleswig War, erupted in 1864.
At the beginning of 1848, Denmark included the Duchy of Schleswig and so the king of Denmark also ruled the duchies of Holstein and Saxe-Lauenburg within the German Confederation. The majority of the ethnic Germans in Denmark lived in these regions, making up a third of the countries population and accounting for half of Denmark's economy. The recently ended Napoleonic Wars had fanned both Danish and German nationalism and these conflicting aims contributed to the outbreak of the war. Danish nationalists believed that Schleswig, but not Holstein, should be a part of Denmark, as Schleswig contained a large number of Danes, whilst Holstein did not.
The majority of the ethnic Germans in Denmark lived in the Schleswig-Holstein region and with the recent ending of the Napoleonic wars feelings of both Danish and German nationalism had increased. German nationalists believed that Schleswig, Holstein, and Lauenburg should remain united, and their belief that Schleswig and Holstein should not be separated led to the two duchies being referred to as Schleswig-Holstein. Schleswig became a particular source of contention, as it contained a large number of Danes, Germans and North Frisians. Another cause of the war was the legally questionable change to the rules of ducal succession in the duchies.