In the February Revolution in March 1917, Tsar Nicholas II of Russia was deposed, and the Russian Provisional Government that succeeded formed the Russian Republic. Troyanov stayed on in the post-imperial Russian Army, and on 1–2 July 1917, under Troyanov′s command, the Czechoslovak Legion defeated numerically superior Austro-Hungarian forces in Galicia in the Battle of Zboriv during the Kerensky Offensive. For his skillful leadership in the battle, Troyanov was promoted to major general and was made commander of the 1st Finland Rifle Division.