Otto Von Bismarck achieved the unification of Germany during a series of wars in which a Prussian military force, under Bismarck's command, was able to acquire land and subsequently enforce new laws over its peoples. These wars became known as the wars of German unification.
Bismarck allied with the Austrian chancellor and his military force during the first war of German unification. In 1862 the newly formed Austrian-Prussian military force successfully engaged in an offensive against the Danes located in the areas of Schleswig and Holstein. The area was a part of the German Confederation of Northern States, but was contested by Danish claims of authority.
The second war of German unification occurred in 1866, when Bismarck and Prussia battled their greatest German rival, Austria. Known as the Austro-Prussian War, the fighting lasted only a few weeks. Although Bismarck and Prussia were victorious, Bismarck allowed many of his enemies (such as Austrian allies, Baden and Bavaria) to maintain their independence. Bismarck instead formed the North German Confederation, which served as the strongest German political body in Europe and attracted many other, smaller German states as allies.
The final war of German unification occurred when Bismarck attracted the allegiance of the western German states by engaging in the Franco-Prussian war in 1870. After defeating the French, and signing a peace treaty in the palace of Versailles in 1871, Bismarck declared Berlin the official capital of the new German Empire and the King of Prussia the Kaiser of all German states. This arrangement remained until the end of the first World War in 1918.