The Polish-Soviet war of 1919-1920 crucially defined the borders of Poland. Marshal Józef Piłsudski realised that the Bolsheviks wanted to spread their revolution westwards through Poland. Piłsudski aimed to create a series of independent nations from Finland in the north to Georgia in the south to be able to stop the expansion of the Russian empire. He managed to take advantage of Russia's internal war between the Soviet Reds and the counter-revolutionary Whites. His armies marched deep into Belarus and Ukraine. He was beaten back to Warsaw but skilfully regrouped his forces to pursue the Russians eastwards, regaining a sizable chunk of the old Polish-Lithuanian Commonwealth's eastern territories, confirmed by the Treaty of Riga in 1921. Piłsudski somehow hoped that he could restore the union between Poland and Lithuania.
At the very end of the war, Piłsudski took his home city of Wilno (Vilnius). Wilno had a predominantly Polish population but it was wanted by Lithiania, who opted for independence rather than the revival of a Polish-Lithuanian union. On 12 October 1920, Central Lithuania (the stretch of territory, including Wilno, occupied by Polish troops) formally became an independent state, as a result of a military operation carried out by general Lucjan Żeligowski on the orders of Marshal Józef Piłsudski.
In 1922, Central Lithuania was incorporated into Poland. Lithuania became dependent on and was annexed by the Soviet Union in 1940. Lithuania recovered its independence in 1990/1991.
Map of the ethnic composition of Central Lithuania (www.halgal.com)
Peace of Riga