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.
History of Romania
After the negotiated retreat of Soviet troops, Romania, under the new leadership of Nicolae Ceauşescu, started to pursue independent policies, including the condemnation of the Soviet-led 1968 invasion of Czechoslovakia (Romania being the only Warsaw Pact country not to take part in the invasion), the continuation of diplomatic relations with Israel after the Six-Day War of 1967 (again, the only Warsaw Pact country to do so), and the establishment of economic (1963) and diplomatic (1967) relations with the Federal Republic of Germany. Also, close ties with the Arab countries (and the PLO) allowed Romania to play a key role in the Israel-Egypt and Israel-PLO peace processes by intermediating the visit of Egyptian president Sadat in Israel.