Russia and Mongolia share a 3,500-kilometer border. When Chinese forces attacked Mongolia in 1919 to negate its independence from China, the Soviet Red Army helped Mongolia ward off the invasion. The Mongolian People's Republic was established in 1921 with Soviet military support and under Soviet influence.
Communist era
The Soviet Union supported the revolution which brought the Mongolian People's Party to power as the ruling party of the Mongolian People's Republic, established in 1924. Over the next seventy years, Mongolia "pursued policies in imitation of the devised by the USSR" as a Soviet satellite state. Mongolian supreme leader Khorloogiin Choibalsan, acting under Soviet instructions, carried out a mass terror from 1936 to 1952, with the greatest number of arrests and executions occurring between September 1937 and November 1939. Soviet influences pervaded Mongolian culture throughout the period, and schools through the nation, as well as the National University of Mongolia, emphasized Marxism-Leninism. Nearly every member of the Mongolian political and technocratic elite, as well as many members of the cultural and artistic elite, were educated in the USSR or one of its Eastern European allies. The Mongolian economy was heavily reliant on the Soviet bloc for electric power, trade, and investment. The MPR collapsed in 1990 and the first democratically elected government took office the same year, leading to "a wedge in the previously close relationship between Mongolia and the Soviet bloc." After 1992, Russian technical aid stopped, and Russia made a request to Mongolia to pay back all the aid which it had received from the Soviet Union from 1946 to 1990, a figure which the Soviets estimated at 11.6 billion Soviet transferable rubles. The communist regimes of Mongolia and the USSR forged close bilateral relations and cooperation. Both nations established close industrial and trade links, especially with the Soviet republics in Central Asia and Mongolia consistently supported the Soviet Union on international issues. Mongolia sought Russian aid to allay fears of Chinese expansionism and a large number of Soviet forces were permanently deployed in Mongolia. In 1986, both countries signed a treaty of peace, friendship and cooperation. Mongolia sided with the Soviet Union following the Sino-Soviet split in the 1950s. Following the example of Soviet leader Mikhail Gorbachev's policy of improving ties with the West and China, Mongolia improved its relations with the United States and China. In 1989, Mongolia and the Soviet Union finalized plans for the withdrawal of Soviet troops from Mongolia.
Modern era
Following the dissolution of the Soviet Union and the end of the Cold War, Mongolia's trade with Russia declined by 80% and China's relations and influence over Mongolia increased. However, Russia has sought to rebuild strong relations with Mongolia in recent years to enhance its standing as a regional power. In 2000, the Russian President Vladimir Putin made a landmark visit to Mongolia—the first by a Russian head of state since Leonid Brezhnev in 1974 and one of the first of Putin's presidency—and renewed a major bilateral treaty. The visit and improvement in bilateral relations was popularly welcomed in Mongolia as countering China's influence. Russia lowered prices of oil and energy exports to Mongolia and enhanced cross-border trade. The Russian government wrote off 98% of Mongolia's state debt and an agreement was signed to build an oil pipeline from Russia to China through Mongolia.