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 by country
With the entry of Soviet troops into Romania and a royal coup in August 1944, a pro-Allied government was installed, and after Germany and Hungary declared war on Romania, the country joined the Allies as a co-belligerent for the remainder of the war. The total number of troops deployed against the Axis was 567,000 men in 38 army divisions. The Romanian Army was involved in the siege of Budapest and reached as far as Czechoslovakia and Austria.