The North German Confederation (Norddeutscher Bund), came into existence in August 1866 as a military alliance of 22 states of northern Germany with the Kingdom of Prussia as the leading state. In July 1867 it was transformed into a federal state. It provided the country with a constitution and was the building block of the German Empire, which adopted most parts of the federation's constitution and its flag.
Unlike the German Confederation, the North German Confederation was in fact a true state. Its territory comprised the parts of the German Confederation north of the river Main, plus Prussia's eastern territories and the Duchy of Schleswig, but excluded Austria, Bavaria, Württemberg, Baden and the southern parts of the Grand Duchy of Hesse.
However, it cemented Prussian control over northern Germany, and emanated that same control via the Zollverein (Customs Union) and secret peace treaties (agreed with the southern states the day before the Peace of Prague) into southern Germany.
Although it ceased to exist after the creation of the German Empire in 1871, the federation was the building block for the German constitution adopted that year. This constitution granted huge powers to the new chancellor, Otto von Bismarck who was appointed by the President of the Bundesrat (Prussia). This was because the constitution made the chancellor 'responsible,' however not accountable, to the Reichstag. This therefore allowed him the benefit of being the link between the emperor and the people. The Chancellor retained powers over the military budget, after the constitutional crisis that engulfed Wilhelm I in 1862. Laws also prevented certain civil servants becoming members of the Reichstag, those who were Bismarck's main opposition in the 1860's.
The federation came into being after Prussia defeated Austria and the other remaining states of the German Confederation in the Austro-Prussian War of 1866. Otto von Bismarck created the constitution, which came into force on 1 July, 1867, with the King of Prussia, William I, as its President, and Bismarck as Chancellor. The states were represented in the Bundesrat (Federal Council) with 43 seats (of which Prussia held 17). Most notably, Bismarck introduced universal male suffrage into the confederation for elections to the Reichstag. The Bundesrat membership was extended before 1871 with the creation of the Zollverein Parliament in 1867, an attempt to create closer unity with the southern states by permitting representatives to be sent to the Bundersrat.
Following Prussia's victory over the Second French Empire in the Franco-Prussian War of 1871, Bavaria, Württemberg, and Baden (together with parts of the Grand Duchy of Hesse which had not originally joined the federation), now grouped together with the various states of the Federation to form the German Empire, with William I taking the new title of German Emperor (rather than Emperor of Germany as Austria was not included).
One of the functions of the confederation was to handle mail and issue postage stamps; for details, see postage stamps and postal history of the North German Confederation.