In 1914, Russia entered World War One. The war began to go against the Russians, and by 1917 calls for tsar's abdication had become all the louder. As such, the tsar fell on his sword and abdicated the throne. Soon after Lenin returned to the USSR, and in October 1917 organized a Bolshevik coup that ended the provisional government.
Despite the relative success of the coup, opposition to the Bolsheviks remained. It soon became clear that the Bolshevik Party did not have majority support in Russia. The Socialist Revolutionaries gained the biggest share of votes in the constituent assembly. This assembly was later disbanded, and with that the path set for a cival war.
Only during this conflict, in which Trotsky organized the Red Army against the Whites, was a Bolshevik victory won. The Whites were not an especially united coalition of armies, and with the Red Army gaining access to the railways they had a number of advantages. So by the early 1920s the Whites had dispersed as the Bolsheviks established the regime.
This marked the beginning of the USSR, a union of socialist republics, in 1922. This included Ukraine and Baltic states as part of the USSR. As Lenin was Communist Party Leader he was the first Premier of the Soviet Union.
As the Russian Civil War ended, years of conflict had weakened the USSR's economy. The abject failure of War Communism played its part in the economic circumstances, as black markets emerged and industrial and agriculture output fell to below prewar levels. Consequently, the Bolsheviks abandoned War Communism in 1921 in favor of Lenin's New Economic Policy.
The New Economic Policy (NEP) was a step back for the communist ideology. In fact, the policy introduced free-market reform; and a more mixed economy that Lenin dubbed 'state capitalism.' NEP left the Bolshevik Party split, but as Lenin was strongly in favor it became party policy.
NEP ensured a degree of economic recovery. Agricultural output greatly increased, and the USSR's industry also expanded. By 1928, the USSR's economic recovery had restored production to prewar levels.
As such, the USSR was reaching something of a cross-roads. The passing of Lenin had left the question of whom would succeed him as Bolshevik Party leader. Lenin did not name a clear successor. The likes of Trotsky and Stalin, who occupied key positions within the Politburo, were two potential candidates. By 1927, Stalin was party leader; and rivals such as Trotsky left the USSR.
The USSR had recovered economically by 1927, and with a new Soviet Premier began to pursue new policies that would build on NEP. From here on, industrial output continued to greatly increase as the USSR emerged as one of the leading industrial countries.