Hungarian–Soviet relations were characterized by political, economic, and cultural interventions by the Soviet Union in internal Hungarian politics for 45 years, the length of the Cold War. Hungary became a member of the Warsaw Pact in 1955; since the end of World War II, Russian troops were stationed in the country, intervening at the time of the Hungarian Revolution of 1956. Starting in March 1990, the Soviet Army began leaving Hungary, with the last troops being withdrawn on June 19, 1991.
By 1943–1944, the tide of World War II had turned. The Red Army regained the pre-war Soviet territory, and advanced westward from its borders to defeat Germany and its allies, including Hungary. Officially, Soviet military operations in Hungary ended on 4 April 1945, when the last German troops were expelled, although Soviet troops (and political advisers) remained within the country.
During the period of Soviet occupation of Hungary in World War II (1944–45) under a system known in Hungary as malenki robot (Russian for "little work") it is estimated that up to 600,000 Hungarians (of which up to 200,000 were civilians) were captured by the occupying Soviets and deported to labour camps in the Soviet Union - of those deported, up to 200,000 perished. The first deported Hungarians started to return to Hungary in June 1946, with the last returning in the years 1953-1955, after Stalin's death. The Soviet policy of deportations for forced labor extended to other occupied nations, however no other Soviet occupied nation was hit as hard as Hungary - for comparison, it is estimated that 155,000 to 218,000 Germans were deported from mainland Germany.
The Soviets made sure that a post-war government dominated by Communists was installed in the country before transferring authority from the occupation force to the Hungarians.
In elections held in November 1945, the Independent Smallholders' Party won 57 percent of the vote. The Hungarian Communist Party, under the leadership of Mátyás Rákosi and Ernő Gerő, received support from only 17 percent of the population. The Soviet commander in Hungary, Marshal Kliment Voroshilov, refused to allow the Smallholders Party to form a government. Instead, Voroshilov established a coalition government with the Communists holding some of the key posts. Later, Mátyás Rákosi boasted that he had dealt with his partners in the government one by one, "cutting them off like slices of salami." The Hungarian monarchy was formally abolished on February 1, 1946, and replaced by the Republic of Hungary. The gradual takeover by the Communists was completed on August 18, 1949, when Hungary became the People's Republic of Hungary.
The presence of Soviet troops in Hungary was formalized by the 1949 mutual assistance treaty, which granted the Soviet Union rights to a continued military presence, assuring ultimate political control. The Soviet forces in Hungary were part of the so-called Central Group of Forces headquartered in Baden, near Vienna.
The Hungarian Revolution of 1956 was a spontaneous nationwide revolt against the Communist government of Hungary and its Soviet-imposed policies. After announcing their willingness to negotiate the withdrawal of Soviet forces, the Soviet Politburo changed its mind and moved to crush the revolution. On November 4, 1956, a large joint military force of the Warsaw Pact, led by Moscow, entered Budapest to crush the armed resistance.
The Soviet intervention, codenamed "Operation Whirlwind", was launched by Marshal Ivan Konev. The five Soviet divisions stationed in Hungary before October 23 in the first intervention ("Operation Wave") were augmented to a total strength of 17 divisions. The 8th Mechanized Army under command of Lieutenant General Hamazasp Babadzhanian and the 38th Army under command of Lieutenant General Hadzhi-Umar Mamsurov from the nearby Carpathian Military District were deployed to Hungary for the operation. This second intervention came after three days of deception. The Russians negotiated with the Hungarians (the so-called mixed commission headed by Pál Maléter) about the withdrawal of Soviet troops on the island of Tököl, but at the same time flew János Kádár and Ferenc Münnich secretly to the Soviet Union on November 1 to establish a new pro-Soviet Hungarian government.
At 3:00 a.m. on November 4, Soviet tanks penetrated Budapest along the Pest side of the Danube in two thrusts—one from the south, and one from the north—thus splitting the city in half. Armored units crossed into Buda, and at 4:25 a.m. fired the first shots at the army barracks on Budaörsi road. Soon after, Soviet artillery and tank fire was heard in all districts of Budapest. Operation Whirlwind combined air strikes, artillery, and the coordinated tank-infantry action of 17 divisions. By 8:00 am organised defence of the city evaporated after the radio station was seized, and many defenders fell back to fortified positions. Hungarian civilians bore the brunt of the fighting, and it was often impossible for Soviet troops to differentiate military from civilian targets. For this reason, Soviet tanks often crept along main roads firing indiscriminately into buildings. Hungarian resistance was strongest in the industrial areas of Budapest, which were heavily targeted by Soviet artillery and air strikes. Soviet army officers, largely unable to speak Hungarian, began indiscriminately arresting anyone showing resistance, including sixty-eight minors, among them nine young girls, pro-Soviet Hungarian officers, and German employees of the Red Cross. According to KGB chief Ivan Serov's report on November 11, as many as 3,773 insurgents were arrested, and by November 13, the number grew to 4,056. Several hundreds were illegally deported by train to Uzhgorod (Ungvár) in Soviet Ukraine and transported to several prisons in Stryi, Drohobych, Chernivtsi, and Stanislav (Ivano-Frankivsk). After international protests by the United Nations, they were transported back to Hungary in December. Within Hungary, the last pocket of resistance called for ceasefire on 10 November. Over 2,500 Hungarians and 722 Soviet troops had been killed and thousands more were wounded.
The crushing of the Hungarian Revolution strengthened Soviet control over the Eastern Bloc. The Soviets had Imre Nagy replaced as Prime Minister of Hungary with János Kádár, the leader of the Hungarian Socialist Workers' Party. Nagy, with a few others, was given sanctuary in the Yugoslav Embassy. In spite of a written safe conduct of free passage by János Kádár, on 22 November 1956, Nagy was arrested by the Soviet forces as he was leaving the Yugoslav Embassy, and taken to Snagov, Romania. Subsequently, the Soviets returned him to Hungary, where he was secretly charged with organizing to overthrow the Hungarian people's democratic state and with treason. Nagy was secretly tried, found guilty, sentenced to death and executed by hanging in June 1958. According to Fedor Burlatsky, a Kremlin insider, Soviet Premier Nikita Khrushchev had Nagy executed, "as a lesson to all other leaders in socialist countries."
In the wake of the Revolutions of 1989, the Soviet troops – the Southern Group of Forces – started leaving Hungary. By July 1990, some 15,000 Soviet soldiers and their dependents had left, taking about 60,000 of the 560,000 tons of equipment they had stored there. There were 5,750 buildings left on the 60 army camps and 10 air bases maintained by the Soviet Army in Hungary. The Soviets reportedly asked for 50 billion forints (some 800 million US dollars at the time), as compensation for the "Soviet investment" in Hungary; the then-commander of Soviet troops in Hungary, Col. Gen. Matvei Burlakov (succeeded by Lt. Gen. Shilov), said that the troop withdrawals may be held up if the Hungarians refused to pay.
The remaining 40,000 Soviet troops left Hungary, starting in March 1990, with the last leaving on June 19, 1991.