By 1900, Germany's economy matched Britain's, allowing colonial expansion and a naval race. Germany led the Central Powers in the First World War (1914–1918) against France, Great Britain, Russia and (by 1917) the United States. Defeated and partly occupied, Germany was forced to pay war reparations by the Treaty of Versailles and was stripped of its colonies as well as Polish areas and Alsace-Lorraine. The German Revolution of 1918–19 deposed the emperor and the kings, leading to the establishment of the Weimar Republic, an unstable parliamentary democracy.

Under occupation by the Allies, German territories were split off, denazification took place, and the Cold War resulted in the division of the country into democraticWest Germany and communist East Germany. Millions of ethnic Germans fled from Communist areas into West Germany, which experienced rapid economic expansion, and became the dominant economy in Western Europe. West Germany was rearmed in the 1950s under the auspices of NATO, but without access to nuclear weapons. The Franco-German friendship became the basis for the political integration of Western Europe in the European Union. In 1989, theBerlin Wall was destroyed, the Soviet Union collapsed and East Germany wasreunited with West Germany in 1990. In 1998–1999, Germany was one of the founding countries of the Eurozone. Germany remains one of the economic powerhouses of Europe, contributing about one quarter of the Eurozone's annualgross domestic product. In the early 2010s, Germany played a critical role in trying to resolve the escalating Euro crisis, especially regarding Greece and other Southern European nations.