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.
Diplomatic history of World War I
Romania, a small rural Orthodox nation of 7,500,000 people in 54,000 square miles of territory, was neutral for the first two years of the war. It had the major oil fields in Europe, and Germany eagerly bought its petroleum, as well as food exports. King Carol favored Germany but after his death in 1914, King Ferdinand and the nation's political elite favored the Entente. For Romania, the highest priority was taking Transylvania from Hungary, thus adding ca. 5,200,000 people, 54% (according to 1910 census) or 57% (according to the 1919 and 1920 censuses) of them Romanians. The Allies wanted Romania to join its side in order to cut the rail communications between Germany and Turkey, and to cut off Germany's oil supplies. Britain made loans, France sent a military training mission, and Russia promised modern munitions. The Allies promised at least 200,000 soldiers to defend Romania against Bulgaria to the south, and help it invade Austria. In August 1916 Romania entered the war on the Allied side. The Romanian army was poorly trained, badly equipped and inadequately officered. Romania did invade Austria-Hungary, but was soon thrown back, and faced a second front when Bulgarian troops, supported by German and Ottoman forces, invaded in Dobruja. By the end of 1916, two-thirds of the country (including the capital Bucharest) were occupied by the Central Powers and only Moldavia remained free. The Allied promises proved illusory, and when Romanian oilfields were threatened, the British destroyed the Ploiești oilfields to keep them out of German hands. On July 22, 1917, the Romanians launched a joint offensive with Russia against the Austro-Hungarian 1st Army, around Mărăști and the lower part of the Siret river, which resulted in the Battle of Mărăști. Although there was some initial success, a counter-offensive by the Central Powers in Galicia stopped the Romanian-Russian offensive. The subsequent German and Austrian-Hungarian push to knock Romania out of the war was stopped at Mărășești and Oituz by the Romanian and Russian forces. When Russia collapsed in late 1917, the Romanian cause was hopeless, and Romania had no choice but to conclude the Armistice of Focșani on 9 December 1917 and in May 1918 the Treaty of Bucharest. It demobilized its surviving soldiers; nearly half the 750,000 men (335,706) it had recruited were dead, and the economy was ruined. On 10 November 1918, as the Central Powers were all surrendering, Romania again joined the Allied side. On 28 November 1918, the Romanian representatives of Bukovina voted for union with the Kingdom of Romania, followed by the proclamation of a Union of Transylvania with Romania on 1 December 1918 by the representatives of Transylvanian Romanians gathered at Alba Iulia, while the representatives of the Transylvanian Saxons approved the act on 15 December at an assembly in Mediaș. A similar gathering was held by the minority Hungarians in Cluj, on 22 December, to reaffirm their allegiance to Hungary. The Romanian control of Transylvania, which had also a minority Hungarian-speaking population of 1,662,000 (31.6%, according to the census data of 1910), was widely resented in the new nation state of Hungary. This started the Hungarian-Romanian War of 1919 between Romania and the Hungarian Soviet Republic, which also waged parallel conflicts with Czechoslovakia and the Kingdom of Serbs, Croats and Slovenes. The conflict with Romania ended with a partial Romanian occupation of Hungary.