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.
Romania in World War II
Eight days later Nazi Germany invaded the Second Polish Republic. Expecting military aid from Britain and France, Poland chose not to execute its alliance with Romania in order to be able to use the Romanian Bridgehead. Romania officially remained neutral and, under pressure from the Soviet Union and Germany, interned the fleeing Polish government after its members had crossed the Polish–Romanian border on 17 September, forcing them to relegate their authority to what became the Polish government-in-exile. After the assassination of Prime Minister Armand Călinescu on 21 September King Carol II tried to maintain neutrality for several months longer, but the surrender of the Third French Republic and the retreat of British forces from continental Europe rendered the assurances that both countries had made to Romania meaningless.