In 1863-64, the conflict between the German Confederation and the United Monarchy of Denmark about the rightful allegiance of the Duchies of Schleswig and Holstein came to a head.
On behalf of the German Federation, Prussia and Austria began the war against Denmark on 1 February 1864. The Danes attempted to defend the Dannevirke fortifications, but abandoned the attempt and withdrew their troops to Dybbøl and Fredericia, where defence against a superior foe was relatively easier. After this, it was largely a question of position and trench warfare between the Danish and Prussian forces at Dybbøl.
On 18 April, the Prussians took the Dybbøl fortifications, but at the cost of great losses the Danes managed to retreat to Als and dig in there. A ceasefire and peace negotiations produced no solution.
On 26 June, the ceasefire between Prussia and Denmark expired and on 29 June at 02.00 hours, 2,500 Prussian soldiers in 163 boats crossed the Alssund at Sottrupskov. The Danish forces on Kærhalvøen took up the fight, but the defence of Als was too weak and too badly organised.
At 02.45 hours, the Danish Ironclad, Rolf Krake, appeared on the scene and put a temporary stop to the transfer of Prussian troops. At this point there were already some 5,000 Prussian troops on Als and the Danish forces were hard pressed.
The Captain of the Rolf Krake, judging that the battle was lost, began to use the ironclad to evacuate Danish troops from Als.
In the course of the early morning, the Prussian troops mopped up the remaining Danish resistance, and at 05.30 hours the Danes abandoned the defence of Als and withdrew, still fighting, to the Kegnæs peninsula. From here the troops were shipped out in the course of the following days; on 1 July the last Danish soldier left Kegnæs – the last bastion of the Danish forces on the island of Als.
The Danish army lost 3,148 men killed, wounded or taken prisoner, whilst the Prussian losses were 372 men.
The Battle of Als was the decisive battle in the war of 1864, which had lasted for five months. With the loss of Als, panic and despondency reigned in Denmark, and an armistice was requested. At the ensuing peace negotiations in Vienna, the Danes were forced unconditionally to sign the peace treaty, which meant the loss of the whole of Schleswig, Holstein and Lauenborg, and thus the dissolution of the United Monarchy of Denmark.