In 1918, in the aftermath of the "Charge at Rarańcza", as commander of the 2nd Polish Auxiliary Corps with the Austrian Army, Haller broke through the Austro-Russian front line to Ukraine, where he united his troops with Polish detachments which had left the Tsarist army. He protested the Treaty of Brest-Litovsk and continued to fight the Russians with his II Brigade of the Polish Legions (later, the 4th and 5th Rifle Divisions of the Polish II Corps). Under the pressure of the Germans, who after the Peace of Brest-Litovsk regarded the presence of Polish troops in Ukraine as illegal, and a fierce battle between Poles and Germans at Kaniów (10 May 1918, 2500 casualties) his corps was interned, while the Brigadier himself managed to escape to Moscow. Subsequently, by the way of Murmansk, he arrived in France in July 1918, where on behalf of the Polish National Committee he created what was known as the Blue Army (from the color of its French uniforms, also known as "Haller's Army"). For the next few months his army, allied to the Entente, would fight against Germany. In 1919, at the new army's head, he arrived in Poland and was dispatched to the Ukrainian front. In 1920 Haller seized Pomerania and entered Danzig (Gdańsk) in the name of Poland, and during the Polish-Soviet War he commanded an army of volunteers. He was also Inspector General of the Army and a member of the War Council.