The Russian Soviet Federative Socialist Republic (Russian SFSR or RSFSR; Rossiyskaya Sovetskaya Federativnaya Sotsialisticheskaya Respublika, rɐˈsjijskəjə sɐˈvjetskəjə fjɪdjɪrɐˈtjivnəjə sətsɨəljɪˈsjtjitɕɪskəjə rjɪˈspubljɪkə), previously known as the Russian Soviet Republic and the Russian Socialist Federative Soviet Republic, as well as being unofficially referred to as Soviet Russia, the Russian Federation, or simply Russia, was an independent federal socialist state from 1917 to 1922, and afterwards the largest and most populous Soviet socialist republic of the Soviet Union (USSR) from 1922 to 1991, until becoming a sovereign part of the Soviet Union with priority of Russian laws over Union-level legislation in 1990 and 1991, the last two years of the existence of the USSR. The Russian SFSR was composed of sixteen smaller constituent units of autonomous republics, five autonomous oblasts, ten autonomous okrugs, six krais and forty oblasts. Russians formed the largest ethnic group. The capital of the Russian SFSR and the USSR as a whole was Moscow and the other major urban centers included Leningrad, Stalingrad, Novosibirsk, Sverdlovsk, Gorky and Kuybyshev. It was the first Marxist-Leninist state in the world.
The economy of Russia became heavily industrialized, accounting for about two-thirds of the electricity produced in the USSR. By 1961, it was the third largest producer of petroleum due to new discoveries in the Volga-Urals region and Siberia, trailing in production to only the United States and Saudi Arabia. In 1974, there were 475 institutes of higher education in the republic providing education in 47 languages to some 23,941,000 students. A network of territorially organized public-health services provided health care. After 1985, the "perestroika" restructuring policies of the Gorbachev administration relatively liberalised the economy, which had become stagnant since the late 1970s under General Secretary Leonid Brezhnev, with the introduction of non-state owned enterprises such as cooperatives.