 After the Russian Revolution of 1917 he left Moscow and returned to his homeland, where in 1919 he became a commander of the Polska Organizacja Wojskowa in the area of Livonia.During the Polish-Bolshevik War he crossed the front lines and reached Vilna (modern Vilnius), where he took part in the defense of the city against the Reds.He also took part in the seizure of Vilnius by the forces of Gen. Lucjan Żeligowski.