As a sergeant, in July 1916 he was transferred to the 1st Brigade of Legions, in which he served until the oath crisis. He was arrested on 4 September 1917 and imprisoned in Przemyśl. He was threatened with the death penalty for active participation in the crisis. Shortly thereafter he was released and forced to join the Austro-Hungarian Army, from which he deserted in March 1918. He broke into the Polish II Corps in Russia commanded by general Józef Haller, in whose ranks he took part in the Battle of Kaniów. After escaping from German captivity, he got to the Polish Military Organisation in Kiev. He took part in numerous subversive actions and battles with German, and Ukrainian troops. He also infiltrated Austrian troops.