After the Bolsheviks, now called the Communist Party of Soviet Russia, the CPSU, had emerged victorious from the Russian Civil War, they held complete power over Russia. At this point, in 1921, Stalin was a high ranking Communist official, holding the post of Commissar for Nationalities, but he was not widely respected by other high ranking officials, who still saw him as a simple thug.
In 1922, the post of General Secretary was created and offered by Lenin to many of the major Communists, such as Trotsky, Kamenev, Zinoviev, Rykov and Tomsky. However, they all declined, believing that the post, which was mainly a simple administrative task, deciding upon who was able to join the Party at the lowest levels, was beneath them. Once all the leading Communists had rejected the post, it was offered to Stalin, who accepted, mainly for the large house that came with the post.
What nobody had realised, not even Lenin, was that the post gave Stalin exceptional power over the party machine, as the General Secretary could not only admit people to the CPSU, but remove them as well. As being in the Party came with a number of benefits, those in the Party wanted to stay in it, whilst those not in the Party wanted to get in. Therefore, whoever held the post of General Secretary had tremendous power over the Party, as it was the Party members who voted in the key debates of the Party, which ultimately determined who the Politburo, the main decision making body, was made up of.
Lenin, the undisputed leader of the Party, suffered a series of strokes in the early 1920s, before he died on January 21st, 1924. Lenin's death threw the Party into turmoil for the next 5 years as a struggle to take control of Russia raged. Trotsky, who had been instrumental in both the revolution of 1917 and the victory in the Civil War, emerged as the favourite to take up Lenin's mantle.
However, Trotsky was not well liked by the other leading Communists, being seen as too arrogant and as a possible dictator. Stalin played upon this, forming an alliance with Kamenev and Zinoviev, who were ideologically closer to Trotsky, on the more hard line Marxist left of the Party. This triumvirate were able to defeat Trotsky in the key debates that rocked the Party following the death of Lenin. This marginalized Trotsky, effectively removing him from contention for the leadership, thanks to Stalin being able to rely on those who he had let enter the Party to vote for him in the debates.
Stalin then attacked his allies, Kamenev and Zinoviev, claiming that their pure Marxist policies were not in the best interest of Russia. Again he was able to defeat them in the debates due to his command of the Party machine resulting from his position of General Secretary, removing more of the opposition. Finally, he turned on the relatively liberal members of the Party, Bukharin, Rykov and Tomsky, who, once again, he defeated in the debates. By 1928, Stalin had won the power struggle and had emerged as the sole leader of the USSR.
This was not at all in line with the wishes of Lenin though, in fact, in his Testament, written in the two years before his death in 1924, Lenin proclaimed that "Stalin is too rude and this defect, although quite tolerable in our midst and in dealing among us Communists, becomes intolerable in a Secretary-General. That is why I suggest that the comrades think about a way of removing Stalin from that post and appointing another man in his stead who in all other respects differs from Comrade Stalin in having only one advantage, namely, that of being more tolerant, more loyal, more polite and more considerate to the comrades, less capricious". Instead, Lenin had argued for a collective leadership, made up of the leading Communists, the very people who Stalin had defeated in his quest for total control.
All was not well however, as the USSR remained a very backward country, far behind the advanced Western nations, such as Britain and the USA, both in industry and agriculture. The peasants, who still made up the majority of the Russian population, resented the Communist Government, and began to hide grain, which was desperately needed to export in return for foreign machinery needed to industrialise, to a point were another famine engulfed Russia. Stalin needed to act, quickly and dramatically if he was to stay in power...