The Basmachi movement or Basmachi Revolt was an uprising against Russian Imperial and Soviet rule by the Muslim peoples of Central Asia. The movement's roots lay in the anti-conscription violence of 1916 that erupted when the Russian Empire began to draft Muslims for army service during World War I. In the months following the October 1917 Revolution the Bolsheviks seized power in many parts of the Russian Empire and the Russian Civil War began. Turkestani Muslim political movements attempted to form an autonomous government in the city of Kokand, in the Fergana Valley. The Bolsheviks launched an assault on Kokand in February 1918 and carried out a general massacre of up to 25,000 people. The massacre rallied support to the Basmachi movements who waged a guerrilla and conventional war that seized control of large parts of the Fergana Valley and much of Turkestan. The fortunes of the decentralized movement fluctuated throughout the early 1920s but by 1923 the Red Army's extensive campaigns had dealt the Basmachis many defeats. After major Red Army campaigns and concessions regarding economic and Islamic practices in the mid-1920s, the military fortunes and popular support of the Basmachi declined. Resistance to Russian rule and Soviet leadership did flare up again, to a lesser extent, in response to collectivization campaigns in the pre-WWII era.

What happened first, the anti-conscription violence or the October Revolution?
anti-conscription violence