By the end of the 19th century, Germany, which had before been a collection of principalities under the Holy Roman Empire, was unified under Otto von Bismarck of Prussia into a single government. This unification was conducted through a series of wars over the course of the 19th century where Prussia established itself as the dominant German state, particularly over its rival, Austria.

Impact of Napoleon

Despite their future animosity, Austria and Prussia, along with other European nations including Russia and Great Britain, formed an alliance in 1803 to halt the growth of Napoleonic France. In 1806, Napoleon Bonaparte defeated this alliance and conquered Germany. He forced Emperor Francis II, at that point the Holy Roman Emperor in name only and really just the ruler of Austria, to abdicate and restructuring Germany's government into the Confederation of the Rhine, effectively a French client state. Prussia and Austria remained independent from this Confederation, and Francis II declared himself Emperor of a separate Austria.

Austro-Prussian Rivalry

Even after Napoleon was defeated at Waterloo by another coalition of countries in 1815 and the Confederation of the Rhine was dismantled, Austria and Prussia remained separate states, and established a new German Confederation in 1815 to reorganize the German principalities and act as a buffer. Over the course of the next half-decade, however, Austrian influence over the German states waned in the face of Prussian military expansion, and in 1866 the tension boiled over into the Ausro-Prussian War. The war lasted only seven weeks and was a humiliating defeat for Austria, and confirmed Prussian dominance over the German Confederation.

German Nationalism

The result of this war was the new North German Confederation of 1867, an alliance of German states that specifically excluded Austria and would form the basis for a unified Germany four years later, completed under Prussian Chancellor Otto von Bismarck. The exclusion of Austria was on the one hand a way for Prussia to remain the dominant power in the new German state, but was also the product of German nationalism, which had been brewing throughout the German states since formation of the Confederation in 1815 and had existed in some form for much longer. Austria was at this time a multinational Empire and its citizens included many non-Germans, and so its inclusion in the new Germany would challenge this image of a unified Germany.

Unification

Ultimately, Bismarck declared Germany a unified nation in 1871, after the Franco-Prussian war. This war saw the Prussian military defeat France as it had Austria five years before. At the palace of Versailles in 1871 Bismarck announced the unification of Germany into an Empire that included all the German states but excluded Austria, as the North German Confederation had done four years earlier. With Wilhelm, King of Prussia, declared as Emperor, Prussian dominance over German government was complete.