Bolshevik-led attempts to gain power in other parts of the Russian Empire were largely successful in Russia proper — although the fighting in Moscow lasted for two weeks — but they were less successful in ethnically non-Russian parts of the Empire, which had been clamoring for independence since the February Revolution. For example, the Ukrainian Rada, which had declared autonomy on 23 June 1917, created the Ukrainian People's Republic on 20 November, which was supported by the Ukrainian Congress of Soviets. This led to an armed conflict with the Bolshevik government in Petrograd and, eventually, a Ukrainian declaration of independence from Russia on 25 January 1918. In Estonia, two rival governments emerged: the Estonian Provincial Assembly, established in April 1917, proclaimed itself the supreme legal authority of Estonia on 28 November 1917 and issued the Declaration of Independence on 24 February 1918. Soviet Russia recognized the Executive Committee of the Soviets of Estonia as the legal authority in the province, although the Soviets in Estonia controlled only the capital and a few other major towns.The success of the October Revolution transformed the Russian state into a soviet republic. A coalition of anti-Bolshevik groups attempted to unseat the new government in the Russian Civil War from 1918 to 1922. In an attempt to intervene in the civil war after the Bolsheviks' separate peace with the Central Powers, the Allied powers  occupied parts of the Soviet Union for over two years before finally withdrawing. The United States did not recognize the new Russian government until 1933. The European powers recognized the Soviet Union in the early 1920s and began to engage in business with it after the New Economic Policy  was implemented.
Question: How many years did the Russian Civil War last?
Answer: 4