The early twentieth century shattered the long peace of the European concert. World War I began on June 28, 1914, with the assassination of Archduke Franz Ferdinand in Sarajevo. The Allies, including France, Britain, Russia (until 1917), Italy (from 1915), the United States (from 1917), and Japan, faced the Central Powers of Germany, Austria-Hungary, the Ottoman Empire, and Bulgaria. The Western Front became defined by the horrors of trench warfare, a static, fortified stalemate that produced unprecedented casualties. Russia, exhausted and destabilized, was forced out of the war by the Treaty of Brest-Litovsk in 1918, signed after the February and October Revolutions of 1917 brought Vladimir Lenin and the Bolsheviks to power. The war ended for the others with the Treaty of Versailles in 1919, whose harsh terms sowed seeds of future conflict, and the League of Nations was founded in 1920 to preserve peace, though it would prove toothless against aggression.
In Russia, the Bolsheviks consolidated their rule, formally establishing the USSR in 1922. Lenin was succeeded by Joseph Stalin, who would transform the Soviet Union into an industrial and totalitarian power. Meanwhile, the United States and Europe faced the Great Depression, triggered by the Wall Street Crash of October 1929, which spread economic misery worldwide. Franklin D. Roosevelt won the U.S. presidency in 1932 and launched the New Deal (1933–1939), a sweeping set of programs that redefined the role of the federal government. Across the Atlantic, Germany suffered acutely: Adolf Hitler became chancellor in 1933 and imposed Nazism, an ideology of extreme nationalism, antisemitism, and totalitarianism. The Spanish Civil War (1936–1939) previewed the coming catastrophe, ending with Francisco Franco's Nationalist victory, while the Munich Agreement of 1938, which allowed Nazi Germany to annex the Sudetenland, became the textbook example of failed appeasement.
World War II began on September 1, 1939, with Germany's invasion of Poland. In 1940, the Royal Air Force repelled the Luftwaffe in the Battle of Britain, preserving Britain as a base for future operations. In 1941, Germany launched Operation Barbarossa against the Soviet Union, drawing the USSR into the war, while the Japanese attack on Pearl Harbor on December 7, 1941, brought the United States in. The conflict witnessed unprecedented atrocity, including the Holocaust, the systematic Nazi genocide that murdered six million Jews and millions of others, alongside mass killings in Cambodia under the Khmer Rouge, in Uganda under Idi Amin, and in many other theaters. The Allied D-Day invasion of Normandy on June 6, 1944 opened a second front, and Germany's surrender on May 8, 1945 (V-E Day) was followed by the atomic bombings of Hiroshima on August 6 and Nagasaki on August 9; Japan surrendered on September 2 (V-J Day). The war's immense destruction had been made possible in part by the Manhattan Project, led scientifically by J. Robert Oppenheimer, and the post-war order was shaped at the Yalta (February 1945) and Potsdam (July–August 1945) conferences, while Nazi leaders faced justice at the Nuremberg Trials. In 1945, the United Nations was founded to replace the failed League of Nations.