Hungary–Romania relations
During World War II, Hungary and Romania became allies and participated in the war against the Soviet Union. But after the coup on 23 August 1944 Romania switched sides and fought against Hungary. Consequently, Soviet and Romanian troops invaded Hungary, occupied Northern Transylvania by October 1944 and re-established the Romanian administration in the region in March 1945. The 1947 Treaty of Paris reaffirmed the borders between Romania and Hungary as originally defined in Treaty of Trianon 27 years earlier, thus confirming the return of Northern Transylvania to Romania.
World War II
At the end of September 1940, the Tripartite Pact formally united Japan, Italy and Germany as the Axis Powers. The Tripartite Pact stipulated that any country, with the exception of the Soviet Union, which attacked any Axis Power would be forced to go to war against all three. The Axis expanded in November 1940 when Hungary, Slovakia and Romania joined. Romania and Hungary would make major contributions to the Axis war against the Soviet Union, in Romania's case partially to recapture territory ceded to the Soviet Union.