The unification of Germany into a politically and administratively integrated nation state officially occurred on 18 January 1871, in the Hall of Mirrors at the Palace of Versailles in France. Princes of the German states, excluding Austria, gathered there to proclaim Wilhelm I of Prussia as German Emperor after the French capitulation in the Franco-Prussian War. Unofficially, the de facto transition of most of the German-speaking populations into a federated organization of states had been developing for some time through alliances formal and informal between princely rulers, but in fits and starts. The self-interests of the various parties hampered the process over nearly a century of autocratic experimentation, beginning in the era of the Napoleonic Wars, which prompted the dissolution of the Holy Roman Empire of the German Nation in 1806, and the subsequent rise of German nationalism.
Unification exposed tensions due to religious, linguistic, social, and cultural differences among the inhabitants of the new nation, suggesting that 1871 only represented one moment in a continuum of the larger unification processes. The Holy Roman Emperor had been often called "Emperor of all the Germanies"; contemporary news accounts frequently referred to "The Germanies". In the empire, higher nobility were referred to as "Princes of Germany" or "Princes of the Germanies"—for the lands once called East Francia had been organized and governed as pocket kingdoms since before the rise of Charlemagne (800 AD). In the mountainous terrain of much of the territory, isolated peoples developed cultural, educational, linguistic, and religious differences over such a lengthy time period. By the nineteenth century, transportation and communications improvements brought these regions closer together.
The Holy Roman Empire of the German Nation, which had included more than 500 independent states, was effectively dissolved when Emperor Francis II abdicated (6 August 1806) during the War of the Third Coalition. Despite the legal, administrative, and political disruption associated with the end of the Empire, the people of the German-speaking areas of the old Empire had a common linguistic, cultural, and legal tradition further enhanced by their shared experience in the French Revolutionary Wars and Napoleonic Wars. European liberalism offered an intellectual basis for unification by challenging dynastic and absolutist models of social and political organization; its German manifestation emphasized the importance of tradition, education, and linguistic unity of peoples in a geographic region. Economically, the creation of the PrussianZollverein (customs union) in 1818, and its subsequent expansion to include other states of the German Confederation, reduced competition between and within states. Emerging modes of transportation facilitated business and recreational travel, leading to contact and sometimes conflict among German speakers from throughout Central Europe.
The model of diplomatic spheres of influence resulting from the Congress of Vienna in 1814–15 after the Napoleonic Wars endorsed Austrian dominance in Central Europe. The negotiators at Vienna took no account of Prussia's growing strength within and among the German states and so failed to foresee that Prussia would rise to challenge Austria for leadership of the German peoples. This German dualism presented two solutions to the problem of unification: Kleindeutsche Lösung, the small Germany solution (Germany without Austria), or Großdeutsche Lösung, the greater Germany solution (Germany with Austria).
Historians debate whether Otto von Bismarck—Minister President of Prussia—had a master plan to expand the North German Confederation of 1866 to include the remaining independent German states into a single entity or simply to expand the power of the Kingdom of Prussia. They conclude that factors in addition to the strength of Bismarck's Realpolitik led a collection of early modern polities to reorganize political, economic, military, and diplomatic relationships in the 19th century. Reaction to Danish and French nationalism provided foci for expressions of German unity. Military successes—especially those of Prussia—in three regional wars generated enthusiasm and pride that politicians could harness to promote unification. This experience echoed the memory of mutual accomplishment in the Napoleonic Wars, particularly in the War of Liberation of 1813–14. By establishing a Germany without Austria, the political and administrative unification in 1871 at least temporarily solved the problem of dualism.
Germania, a personification of the German nation, appears in Philipp Veit's fresco (1834–36). She is holding a shield with the coat of arms of the German Confederation. The shields on which she stands are the arms of the seven traditional Electors of the Holy Roman Empire.
1819: The Carlsbad Decrees suppressed any form of pan-Germanic activities to avoid the creation of a 'German state'; the Kingdom of Prussia, however, initiated a customs union with other Confederation states.
1834: The Prussian-led custom union evolved into the Zollverein that included almost all Confederation states except the Austrian Empire.
1850: The Erfurt Union was a short-lived attempt at a union of German states under a federation, proposed by the Kingdom of Prussia. The Erfurt Union Parliament (Erfurter Unionsparlament), lasting from March 20 to April 29, 1850, was opened at the former Augustinian monastery at Erfurt. The union never came into effect, and was completely undermined by the Punctation of Olmütz, a treaty between Prussia and Austria, signed 29 November 1850, by which Prussia abandoned the Erfurt Union and accepted the revival of the German Confederation under Austrian leadership.
1870: When the French emperor, Napoleon III, demanded territories of the Rhineland in return for his neutrality amid the Austro-Prussian War, Bismarck used the Spanish Succession Question (1868) and Ems Telegram (1870) as an opportunity to incorporate the southern kingdoms. Napoleon III declared war against Prussia.