He became a military commander in 1918, when he fought against the
Czechoslovak Legion ("White Czechs") and the
Orenburg Cossacks of
ataman Alexander Dutov. During the
Polish–Soviet War of 1920, he helped
Mikhail Tukhachevsky drive the Poles back to Warsaw. Gai was appointed commander of the 3rd Cavalry Corps ("Kavkor"), attached to the
4th Army, and consisting of the 10th Division (N. D. Tomin) and the 15th (Kuban) Division (V. I. Matuzenko), with the 164th Rifle Brigade in support. In Tukhachevsky's plan, the role assigned to the Kavkor was "of the utmost importance". It was to operate on the extreme right wing of the Soviet advance and turn the flank of the Polish defence lines, thus allowing them to be rolled up by the attacking armies. The Kavkor advanced rapidly, taking
Vilnius on July 14,
Grodno (where the Red cavalry encountered tanks for the first time) on July 22, reaching the
Vistula in the second week of August, and cutting the crucial
Warsaw–Gdańsk railway. However, the Polish counter-attack resulted in the encirclement of the 4th Army. Gai's Kavkor attempted to break out. After several engagements, it was finally pinned against the German (East Prussian) border by the pursuing Poles. The Kavkor crossed the border on August 26, and Gai was interned by the Germans in the
Salzwedel camp near Berlin. He was twice awarded with the
Order of the Red Banner; in 1919 for battles in the
Volga Region of 1918 and in 1920 for the Polish campaign. == 1921–1935 ==