Pre-1917 Russia was an imperial state, not a nation. In the 1905 Duma elections the nationalist parties received only 9 percent of all votes. The many non-Russian ethnic groups that inhabited the Russian Empire were classified as inorodtsy, or aliens. After the February Revolution, attitudes in regards to this topic began to change. For instance, in early 1917, a Socialist Revolutionary publication called Delo Naroda, No. 5 called for Russia to be transformed into a federal state along the lines of the United States of America. Specifically, separate constituent units inside of this federal state would be created for the various regions and ethnic groups of Russia (such as Little Russia, Georgia, Siberia, and Turkestan).
The Soviet Russia that took over from the Russian Empire in 1917 was not a nation-state, nor was the Soviet leadership committed to turning their country into such a state. In the early Soviet period, even voluntary assimilation was actively discouraged, and the promotion of the national self-consciousness of the non-Russian populations was attempted. Each officially recognized ethnic minority, however small, was granted its own national territory where it enjoyed a certain degree of autonomy, national schools, and national elites. A written national language (if it had been lacking), national language planning, native-language press, and books written in the native language came with the national territory. The attitudes towards many ethnic minorities changed dramatically in the 1930s–1940s under the leadership of Joseph Stalin (despite his own Georgian ethnic roots) with the advent of a repressive policy featuring abolition of the national institutions, ethnic deportations, national terror, and Russification (mostly towards those with cross-border ethnic ties to foreign nation-states in the 1930s or compromised in the view of Stalin during the Great Patriotic War in the 1940s), although nation-building often continued simultaneously for others.
After the establishment of the Soviet Union within the boundaries of the former Russian Empire, the Bolshevik government began the process of national delimitation and nation building, which lasted through the 1920s and most of the 1930s. The project attempted to build nations out of the numerous ethnic groups in the Soviet Union. Defining a nation or politically conscious ethnic group was in itself a politically charged issue in the Soviet Union. In 1913, Stalin, in his work Marxism and the National Question, which subsequently became the cornerstone of the Soviet policy towards nationalities, defined a nation as "a historically constituted, stable community of people, formed on the basis of a common language, territory, economic life, and psychological makeup manifested in a common culture". Many of the subject nationalities or communities in the Russian Empire did not fully meet these criteria. Not only cultural, linguistic, religious and tribal diversities made the process difficult but also the lack of a political consciousness of ethnicity among the people was a major obstacle to this process. Still, the process relied on the Declaration of the Rights of the Peoples of Russia, adopted by the Bolshevik government on 15 November 1917, immediately after the October Revolution, which recognized equality and sovereignty of all the peoples of Russia; their right for free self-determination, up to and including secession and creation of an independent state; freedom of religion; and free development of national minorities and ethnic groups on the territory of Russia.
The Soviet Union (or more formally USSR – the Union of Soviet Socialist Republics) was established in 1922 as a federation of nationalities, which eventually came to encompass 15 major national territories, each organized as a Union-level republic (Soviet Socialist Republic or SSR). All 15 national republics, created between 1917 and 1940, had constitutionally equal rights and equal standing in the formal structure of state power. The largest of the 15 republics – Russia – was ethnically the most diverse and from the very beginning it was constituted as the RSFSR – the Russian Soviet Federative Socialist Republic, a federation within a federation. The Russian SFSR was divided in the early 1920s into some 30 autonomous ethnic territories (Autonomous Soviet Socialist Republics – ASSR and autonomous oblasts – AO), many of which exist to this day as ethnic republics within the Russian Federation. There was also a very large number of lower-level ethnic territories, such as national districts and national village soviets. The exact number of ASSR and AO varied over the years as new entities were created while old entities switched from one form to another, transformed into Union-level republics (e.g., Kazakh and Kyrgyz SSR created in 1936, Moldovan SSR created in 1940), or were absorbed into larger territories (e.g., Crimean ASSR absorbed into the RSFSR in 1945 and Volga German ASSR absorbed into RSFSR in 1941).
The first population census of the USSR in 1926 listed 176 distinct nationalities. Eliminating excessive detail (e.g., four ethnic groups for Jews and five ethnic groups for Georgians) and omitting very small ethnic groups, the list was condensed into 69 nationalities. These 69 nationalities lived in 45 nationally delimited territories, including 16 Union-level republics (SSR) for the major nationalities, 23 autonomous regions (18 ASSR and 5 autonomous oblasts) for other nationalities within the Russian SFSR, and 6 autonomous regions within other Union-level republics (one in Uzbek SSR, one in Azerbaijan SSR, one in Tajik SSR, and three in Georgian SSR).