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.
Romanian Land Forces
During April–May 1944 the Romanian forces led by General Mihai Racoviţǎ, together with elements of the German Eighth Army were responsible for defending Northern Romania during the Soviet First Jassy-Kishinev Offensive, and took part in the Battles of Târgu Frumos. In late August 1944, the Red Army entered eastern Romania. On August 23, 1944, a coup led by King Michael I of Romania deposed Marshal Antonescu and set up a pro-Soviet government. It has been estimated that the royal coup shortened the war by six months. Romania soon declared war on Nazi Germany, and the First and Fourth Armies were pressed into action. After the expelling of the last Wehrmacht remnants from Romania, the Romanian Armies took part in the Siege of Budapest and the Prague Offensive of May 1945.