The defeat of Austria in the Austro-Prussian War in 1866 resulted in a shift in power among the German states away from Austrian hegemony and the abolition of the German Confederation. Prussia, the new sole hegemonic power, subsequently founded the North German Confederation, the first federal state in Germany, which united 22 free cities, small and middle states north of the river Main under Prussian dominance. The new constitution became effective on 1st July 1867, after a draft constitution was presented by Bismarck which was altered by a konstituierender Reichstag. Bismarck planned to make the federal state attractive to southern German states which might later join. The North German Constitution created a national parliament, the Reichstag, and the Bundesrat, the council of the representatives of the allied governments. During the Franco-Prussian War Baden, Bavaria, Württemberg and the North German Confederation united to form a new nation state, which later got the name German Empire. The King of Prussia became German Emperor and the constitution of the Empire was nearly identical to that of the North German Confederation.
The member states of the North German Confederation were
the Kingdoms of Prussia and Saxony,
the Grand Duchies of Hesse (only the northern part), Mecklenburg-Schwerin, Mecklenburg-Strelitz, Oldenburg and Saxe-Weimar-Eisenach,
the Duchies of Anhalt, Brunswick, Saxe-Altenburg, Saxe-Coburg and Gotha and Saxe-Meiningen,
the Principalities of Lippe, Reuss-Gera, Reuss-Greiz, Schaumburg-Lippe, Schwarzburg-Rudolstadt, Schwarzburg-Sondershausen and Waldeck and Pyrmont and
the Free and Hanseatic Cities of Bremen, Hamburg and Lübeck.