The concept of Germany as a distinct region in central Europe can be traced to Roman commander Julius Caesar, who referred to the unconquered area east of the Rhine as Germania, thus distinguishing it from Gaul (France), which he had conquered. The victory of the Germanic tribes in the Battle of the Teutoburg Forest (AD 9) prevented annexation by the Roman Empire. Following the fall of the Roman Empire, the Franks conquered the other West Germanic tribes. When the Frankish Empire was divided among Charlemagne's heirs in 843, the eastern part became East Francia. In 962, Henry the Fowler's son Otto I became the first emperor of the Holy Roman Empire, the medieval German state.
In the High Middle Ages, the dukes and princes of the empire gained power at the expense of the emperors. Martin Luther led the Protestant Reformation against the Catholic Church after 1517, as the northern states became Protestant, while the southern states remained Catholic. They clashed in the Thirty Years' War (1618–1648), which was ruinous to the twenty million civilians. 1648 marked the effective end of the Holy Roman Empire and the beginning of the modern nation-state system, with Germany divided into numerous independent states, such as Prussia, Bavaria and Saxony.
After the French Revolution and the Napoleonic Wars (1803–1815), feudalism fell away and liberalism and nationalism clashed with reaction. The 1848 March Revolution failed. The Industrial Revolution modernized the German economy, led to the rapid growth of cities and to the emergence of the Socialist movement in Germany. Prussia, with its capital Berlin, grew in power. German universities became world-class centers for science and the humanities, while music and the arts flourished. Unification was achieved with the formation of the German Empire in 1871 under the leadership of Prussian Chancellor Otto von Bismarck. The Reichstag, an elected parliament, had only a limited role in the imperial government.
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.
In the early 1930s, the worldwide Great Depression hit Germany hard, as unemployment soared and people lost confidence in the government. In 1933, the Nazis under Adolf Hitler came to power and established a totalitarian regime. Political opponents were killed or imprisoned. Nazi Germany's aggressive foreign policy took control of Austria and parts of Czechoslovakia, and its invasion of Poland initiated the Second World War. After forming a pact with the Soviet Union in 1939, Hitler's blitzkrieg swept nearly all of Western Europe. In the Holocaust, the Jews in Germany and German-occupied areas were systematically killed. In 1941, however, the German invasion of the Soviet Union failed, and after the United States entered the war, Britain became the base for massive Anglo-American bombings of German cities. Following the Allied invasion of Normandy, the German army was pushed back on all fronts until the final collapse in May 1945.
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 democratic West 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, the Eastern bloc collapsed and East Germany was reunited with West Germany in 1990.