The Soviet republics of Russia, Armenia, Azerbaijan, and Georgia sign the Treaty of Kars with the Grand National Assembly of Turkey to establish the contemporary borders between Turkey and the South Caucasus states.

The Treaty of Kars (Turkish: Kars Antlamas, Russian: , tr. Karskii dogovor, Georgian: , Armenian: , Azerbaijani: Qars mqavilsi) was a treaty that established the borders between Turkey and the three Transcaucasian republics of the Soviet Union, which are now the independent republics of Armenia, Georgia and Azerbaijan. The treaty was signed in the city of Kars on 13 October 1921.Signatories of the Treaty of Kars included representatives from the Grand National Assembly of Turkey, which would declare the Republic of Turkey in 1923, and from the Armenian, Azerbaijani and Georgian Socialist Soviet Republics with the participation of the Russian Soviet Federative Socialist Republic. The last four parties would become constituent parts of the Soviet Union after the victory of the Bolsheviks in the Russian Civil War and the December 1922 Union Treaty.The treaty was the successor treaty to the March 1921 Treaty of Moscow. Most of the territories ceded to Turkey in the treaty were acquired by Imperial Russia from the Ottoman Empire during the Russo-Turkish War of 18771878. The only exception was the Surmali region, which had been part of the Erivan Khanate of Iran before it was annexed by Russia in the Treaty of Turkmenchay after the Russo-Persian War of 182628.

The Russian Soviet Federative Socialist Republic (Russian SFSR or RSFSR; Russian: Российская Советская Федеративная Социалистическая Республика, tr. Rossíyskaya Sovétskaya Federatívnaya Socialistíčeskaya Respúblika, IPA: [rɐˈsʲijskəjə sɐˈvʲetskəjə fʲɪdʲɪrɐˈtʲivnəjə sətsɨəlʲɪˈsʲtʲitɕɪskəjə rʲɪˈspublʲɪkə] (listen)), previously known as the Russian Soviet Republic and the Russian Socialist Federative Soviet Republic as well as being unofficially known 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 of the Soviet socialist republics 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 Republic 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 was Moscow and the other major urban centers included Leningrad, Stalingrad, Novosibirsk, Sverdlovsk, Gorky and Kuybyshev.

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.

On 7 November 1917, as a result of the October Revolution, the Russian Soviet Republic was proclaimed as a sovereign state and the world's first constitutionally socialist state guided by communist ideology. The first constitution was adopted in 1918. In 1922, the Russian SFSR signed a treaty officially creating the USSR. The Russian SFSR's 1978 constitution stated that "[a] Union Republic is a sovereign [...] state that has united [...] in the Union" and "each Union Republic shall retain the right freely to secede from the USSR". On 12 June 1990, the Congress of People's Deputies adopted the Declaration of State Sovereignty, established separation of powers (unlike in the Soviet form of government), established citizenship of Russia and stated that the RSFSR shall retain the right of free secession from the USSR. On 12 June 1991, Boris Yeltsin (1931–2007), supported by the Democratic Russia pro-reform movement, was elected the first and only president of the RSFSR, a post that would later become the presidency of the Russian Federation.

The August 1991 Soviet coup d'état attempt with the temporary brief internment of President Mikhail Gorbachev destabilised the Soviet Union. On 8 December 1991, the heads of Russia, Ukraine and Belarus signed the Belovezh Accords. The agreement declared dissolution of the USSR by its original founding states (i.e., renunciation of the 1922 Treaty on the Creation of the USSR) and established the Commonwealth of Independent States (CIS) as a loose confederation. On 12 December, the agreement was ratified by the Supreme Soviet (the parliament of Russian SFSR); therefore the Russian SFSR had renounced the Treaty on the Creation of the USSR and de facto declared Russia's independence from the USSR itself and the ties with the other Soviet Socialist Republics.

On 25 December 1991, following the resignation of Gorbachev as President of the Soviet Union (and former General Secretary of the Communist Party of the Soviet Union), the Russian SFSR was renamed the Russian Federation. The next day after the lowering of the Soviet red flag from the top of the Kremlin Senate building of the Moscow Kremlin in Moscow, the USSR was self-dissolved by the Soviet of the Republics on 26 December, which by that time was the only functioning parliamentary chamber of the All-Union Supreme Soviet (the other house, Soviet of the Union, had already lost the quorum after recall of its members by the several union republics). After the dissolution, Russia declared that it assumed the rights and obligations of the dissolved central Soviet government, including UN membership and permanent membership on the Security Council, but originally excluding foreign debt and foreign assets of the USSR (also parts of the former Soviet Army and nuclear weapons remained under overall CIS command as CIS United Armed Forces).

The 1978 constitution of the Russian SFSR was amended several times to reflect the transition to democracy, private property and market economy. The new Russian constitution, coming into effect on 25 December 1993 after a constitutional crisis, completely abolished the Soviet form of government and replaced it with a semi-presidential system.