In 1928, Stalin replaced the New Economic Policy of the 1920s with a highly centralised command economy and Five-Year Plans, launching a period of rapid industrialization and economic collectivization in the countryside. As a result, the USSR was transformed from a largely agrarian society into a great industrial power, and the basis was provided for its emergence as world's second largest economy after World War II. However, during this period of rapid economical and social changes, millions of people were sent to penal labor camps, including many political convicts, and millions were deported and exiled to remote areas of the Soviet Union. The initial upheaval in the changing agricultural sector disrupted food production in the early 1930s, contributing to the catastrophic Soviet famine of 1932–1933, one of the last major famines in Russia. In 1937–38, a campaign against former members of the communist opposition, potential rivals in the party, and other alleged enemies of the regime culminated in the Great Purge, a period of mass repression in which hundreds of thousands of people were executed, including Red Army leaders convicted in coup d'état plots.
In August 1939,