(Danish: Anden Slesvigske Krig).
For Denmark, a national disaster - for Germany, the opening act in German unification.
Following a convoluted series of events, involving a change in dynasty of the Danish monarchy, and a planned political reorganisation of the constitutional status of the three duchies of Schleswig, Holstein and Lauenburg, the German Union, Prussia and Austria-Hungary declared war in 1864 on Denmark.
It has been argued that the war was planned and provoked by Otto von Bismarck in order to support his planned unification of Germany under Prussian rule.
Whatever the reason for the war, the situation looked grim for the Danes - who nevertheless fought well. Despite intermittent efforts to resolve the conflict through negotiation (including a peace conference in London), the war continued until the Danes were forced to admit defeat. The war ended with Denmark ceding the three duchies to the victors - essentially, to Prussia.
The new border remained in effect until 1920, when (as part of the settlements after WWI) Denmark regained the northern part of the Duchy of Schleswig.