He took part in the First World War, first in the Austro-Hungarian army, and after May 1915 as an officer in the Polish Legion. He commanded a regiment in the Polish–Soviet War of 1919-21. In 1925 he completed studies at a French military school in Paris and became the commander of the Supreme Military School in Warsaw. After Jozef Pilsudski's coup d'état, he was dismissed from that post in 1927 and sent to command an infantry division in Grodno.