The Eastern Front was the eastern theater of World War I which was embattled from 1 August 1914 to 7 May 1918, encompassing (at its greatest extent in 1916) the entire frontier between the Russian Empire and Romania on one side and Austria-Hungary, Bulgaria, the Ottoman Empire, and the German Empire on the other. The front stretched from the Baltic Sea in the north to the Black Sea in the south and involved most of Eastern Europe, as well as parts of Central Europe.
Both the Germans and Russians had made attack plans in the case of war with each other, a possibility which grew more likely after Russia allied itself with Germany's traditional enemy, France, in 1892. In 1905-1906, the German general Alfred von Schlieffen devised the Schlieffen Plan, which would involve a lightning offensive against France through the Ardennes forest of Belgium, followed by the rapid redeployment of the Imperial German Army to defeat Russia before the Imperial Russian Army could complete its mobilization. Russia's heavy losses in the Russo-Japanese War, low population density, and lack of railroads would play key roles in Russia's slow mobilization process. At the same time, in 1910, the Russian general Yuri Danilov developed "Plan 19", under which four Russian armies would invade East Prussia. However, these plans were altered when other Russian generals opined that Austria-Hungary would be a greater threat than the German Empire, so two armies would be sent against East Prussia while the other two would attack Austrian-ruled Eastern Galicia in present-day western Ukraine.
On 28 June 1914, a Serbian-backed Bosnian Serb terrorist, Gavrilo Princip, assassinated Archduke Franz Ferdinand of Austria in Sarajevo, resulting in Austria-Hungary delivering Serbia an ultimatum which was, at the behest of Austria-Hungary's ally of Germany, designed to be rejected in order to provide Austria-Hungary and Germany with a casus belli against Serbia. France and Russia agreed that their alliance terms covered defending Serbia against an Austro-German attack, and, after Austria-Hungary and Germany declared war on Serbia on 28 July 1914, Russia joined the war on Serbia's side on 1 August 1914, followed by a German declaration of war on France two days later, thus opening both the Eastern and Western Fronts of the Great War.
The war began with a Russian invasion of East Prussia, as per Plan 19, but they were beaten back by the Germans at the Battle of Tannenberg after some initial success. The Russians fared better in Galicia, where they defeated the Austro-Hungarian Army in the Battle of Galicia. The Russians also defeated a German attempt to take Warsaw at the Battle of the Vistula River in September-October 1914. In 1915, however, the Germans and Austro-Hungarians attacked, winning the Gorlice-Tarnow Offensive in Galicia and the Second Battle of the Masurian Lakes in Poland, forcing the Imperial Russian Army to embark upon its "Great Retreat". Tsar Nicholas II of Russia assumed personal command of his nation's military and launched several failed counteroffensives, including the Lake Naroch Offensive and the Baranovichi Offensive. In June-September 1916, however, General Aleksei Brusilov launched the successful Brusilov Offensive, pushing back the Central Powers' forces, albeit with crippling losses. Austria-Hungary's army nearly collapsed as a result of the offensive, motivating Romania to join the war on the Russian side and attempt to conquer Hungarian-ruled Transylvania. The Germans rushed reinforcements to the Austro-Hungarians in Transylvania, and Bulgaria - still full of resentment towards its neighbors after the Second Balkan War - launched a surprise attack on Romania from the south and helped the Germans and Austro-Hungarians with overrunning thecountry. In February 1917, the Russian monarchy was overthrown by the February Revolution, which installed a republican provisional government in power, led by Georgy Lvov (and later by Alexander Kerensky). The Russian Republic launched the failed Kerensky Offensive against the Germans and Austro-Hungarians in July 1917, and its disastrous result demoralized the Russian army and led to its soldiers deserting as the Germans captured Riga in the Baltics on 1 September 1917. This was followed by the October Revolution, in which the communist Bolsheviks overthrew the democratic socialist Kerensky government and replaced it with a "dictatorship of the proletariat". The new Bolshevik government sought to remove Russia from the war, agreeing to a ceasefire with the Central Powers on 15 December 1917. The failure of peace talks on 17 February 1918 led to Operation Faustschlag, in which the Central Powers conquered the Baltics, Belarus, and Ukraine, established puppet governments in Lithuania, Latvia, Estonia, Finland, and Ukraine, and forced the Bolshevik government to sign the Treaty of Brest-Litovsk on 3 March 1918, establishing eleven independent German client states and ending Russia's alliance with the Entente powers of Western Europe. On 7 May 1918, Romania signed a similar peace treaty with the Central Powers, ceding the whole of Dobruja, demobilizing 8 divisions, evacuating Austro-Hungarian territory, and granting military access to the Central Powers. King Ferdinand I of Romania refused to sign the treaty himself, and Romania would re-enter the war during the last days of the war, in November 1918. The surrender of the Central Powers in November 1918 led to both Soviet Russia and Romania nullifying their treaties with the Central Powers that same month, resulting in continued German intervention in Eastern Europe amid the Russian Civil War.