Shortly after the 1918 armistice, the independent Second Polish Republic was created, with Józef Piłsudski its chief of state. Poland was granted access to the Baltic through the Danzig Corridor, which created the exclave of East Prussia, separated from mainland Germany. In 1919 an armed struggle ensued between Russian Bolsheviks and Poland, with the Russians determined to recover territories that had been lost in World War I. Bolshevik Russia had signed the Brest-Litovsk peace-treaty with the Central Powers in March 1918, ceding territories to Germany, which were not fully restored by the Treaty of Versailles in 1919. Russia, despite being convulsed by civil war, hoped to fully occupy Poland. Polish forces (supported by Ukraine from 1920) fought the Bolsheviks between February 1919 and March 1921. After a decisive victory in the Battle of Warsaw (12 August 1920) the Poles began to advance eastwards, causing the Russians to sue for peace. In March 1921, the Treaty of Riga was signed and Poland not only received monetary compensation from Russia, but control over present-day Western Ukraine and West Belarus.
— OR —