After seizing control of Russia from the Provisional Government, the Bolsheviks had to safeguard their fragile grip on the reins of power.
Lenin negotiated peace with Germany and therefore an end to Russia's role in World War One. However he could not avoid a civil war.
The Russian Civil War raged from 1918 until the start of 1921. During this time, the Bolsheviks faced massive opposition to their rule in the form of the White Armies, led by former officers of the Tsarist state, and also from intervention by the forces of foreign countries. Yet, by the start of 1921, the Bolsheviks had defeated their enemies and gained a complete victory.