During his reign, William was the commander-in-chief of the Prussian forces in the Second Schleswig War against Denmark in 1864 and the Austro-Prussian War in 1866. After the latter was won by Prussia, William wanted to march on to Vienna and annex Austria, but was dissuaded from doing so by Bismarck and Crown Prince Frederick. Bismarck wanted to end the war quickly, so as to allow Prussia to ally with Austria if it needed to at a later date; Frederick was also appalled by the casualties and wanted a speedy end to hostilities. During a heated discussion, Bismarck threatened to resign if William continued to Vienna; Bismarck got his way. William had to content himself with becoming the "de facto" ruler of the northern two-thirds of Germany. Prussia annexed several of Austria's allies north of the Main, as well as Schleswig-Holstein. It also forced Saxe-Lauenburg into a personal union with Prussia (which became a full union in 1878).