The North German Confederation was formed after Prussia’s victory over Austria in the Austro-Prussian War in 1866. Austria was excluded from Germany, and Prussia established hegemony over a federation of 22 German states. These states had federal autonomy, but were ultimately controlled by a constitution whose head of state, the Prussian king, William I, had presidential power and controlled the military. Eighty per cent of the Confederation was the Kingdom of Prussia and its population was nearly 30,000,000. The Confederation’s territories comprised much of northern Germany and Schleswig-Holstein, a disputed Danish-German territory, which was annexed by the Prussians in 1866. The North German Confederacy evolved into a powerful entity and after the Prussian victory in the 1871 Franco-Prussian War, expanded to include large parts of southern Germany. The Confederation was formed into the German Empire (1871) with William I as its emperor.