The Western Front was the western theater and main theater of war of World War I, lasting from 4 August 1914 to 11 November 1918 as the Imperial German Army battled the Allied armies of France, the British Empire, Belgium, the United States, and their allies in northeastern France and Belgium. Following the Race to the Sea in September-October 1914, the front lines stagnated along trench lines dug by both the Allied and Central Powers, although there were several offensives along the front from 1915 to 1917. The Germans attempted to break the stalemate in 1918 with their Spring Offensive and Operation Michael, although their offensives were eventually repelled and the Allies carried to victory by the decisive Hundred Days Offensive of September-November 1918. On 11 November 1918, the Armistice of Compiegne ended the fighting, and the 1919 Treaty of Versailles formally ended the war.
The Western Front, which was opened by the German invasion of Belgium and the Battle of the Frontiers, began with the Imperial German Army executing the Schlieffen Plan, invading France through neutral Belgium and pushing on Paris. The Germans aimed to capture Paris and knock France out of the war before turning east to finish off France's ally of the Russian Empire, whose mobilization was slowed by Russia's lack of railroads, a dense population, or war supplies after the Russo-Japanese War. Germany's invasion of neutral Belgium led to the United Kingdom, a guarantor of Belgian independence, entering war on the French side. The British Expeditionary Force was sent to aid the French Army and the remnants of the Belgian Army in holding off the Germans, who had overwhelmed much of industrial northeastern France and almost the entirety of Belgium, and the Allies were able to defeat the Germans' attempt to capture Paris in the First Battle of the Marne. The two sides then engaged in a "Race to the Sea", after which they established trenches from the North Sea to the Swiss border. From then until just before the war's end, the Western Front was defined by a deadlock of trench warfare defined by massive artillery bombardments, massed infantry advances, heavy losses inflicted by entrenchments, machine gun emplacements, barbed wire, and artillery, and the employment of new military technology such as poison gas, aircraft, and tanks. The trench warfare of 1915-1918 was a war of attrition which saw several costly offensives such as the 1916 Battle of Verdun (with a combined 700,000 losses for both sides), the 1916 Battle of the Somme (with over 1 million casualties for both sides), and the 1917 Battle of Passchendaele (with 487,000 losses). The German victory on the Eastern Front in March 1918 enabled the Imperial German Army to shift its focus and manpower to the Western Front, launching the Spring Offensive of 1918 with the goal of capturing Paris and ending the war. However, the United States had joined the war in response to German submarine attacks on civilian shipping (its "unrestricted submarine warfare" strategy, meant to sever the Allies' trade and supply routes), and the American Expeditionary Forces, led by General John J. Pershing, played a key role in aiding the Allies in holding back the German offensive in key battles such as the Battle of Saint-Mihiel and the Battle of Belleau Wood. The German "hurricane" bombardments and infiltration tactics nearly won the war on the Western Front, but spirited Allied resistance held them back, and the Allies proceeded to launch a counteroffensive in the last hundred days of the war. The American Meuse-Argonne Offensive and the British-led push towards Belgium resulted in the collapse of the German army and its formidable "Hindenburg Line", and the German commanders were soon convinced that defeat was inevitable. Political turmoil in Germany, partly influenced by the Bolshevik seizure of power in Russia in the Russian Revolution of 1917, resulted in the November Revolution, which forced Germany to conclude an armistice with the Allies on 11 November 1918. The June 1919 Treaty of Versailles, signed by the Weimar Republic of Germany, constrained Germany as a military and economic power, returned coal-rich Alsace-Lorraine to France after almost 50 years of German rule), demilitarized the Saarland on the west bank of the Rhine (which was then occupied by the British and French), and the Kiel Canal was opened to international traffic. The Western Front devastated Western Europe, and the cruelty and astounding loss of life of World War I changed popular attitudes toward war. 3,536,000 soldiers from both sides were killed in action (including 16% of the French Army and 14% of the German Army) and 8,262,000 were wounded, wiping out a whole generation of Europeans through war deaths, disease, and famine (only 48% of French men born in 1894 survived the war), as well as a steep decline in birth rates. The terms of the Treaty of Versailles were considered harsh by President of the United States Woodrow Wilson but too lenient by General Ferdinand Foch, who prophetically said of the 1919 Treaty of Versailles, "This is not peace. It is an armistice for twenty years." The war resulted in the development of a political system of extremities across Europe as millions of disillusioned survivors of the war turned to communism and fascism, and Foch's words would prove prophetic when Adolf Hitler's Nazi regime in Germany started World War II twenty years later with Nazi Germany's invasion of Poland.