There was a period of revolutions and interventions in Hungary between 1918 and 1920. The First Hungarian Republic was founded from the ruins of the Austro-Hungarian Empire by Mihály Károlyi during the Aster Revolution in 1918, at the end of World War I. In March 1919, the republic was overturned by another revolution, and the Hungarian Soviet Republic was created. Unresolved conflicts led to wars between Hungary and its neighbor states (Kingdom of Romania, Kingdom of Serbs, Croats and Slovenes and the evolving Czechoslovakia) in 1919. The Hungarian Soviet Republic ceased to exist after the Romanian occupation. The 1920 Treaty of Trianon in Versailles created the Kingdom of Hungary.
Background
With the volatile and politically unstable atmosphere of Central Europe in the interwar years, the establishment of independent governments of the former Austria-Hungary in November 1918 would see the struggle to regain territories of the former empire. However, the President of the Hungarian Democratic Republic, Mihály Károlyi, resigned within four months (on March 20, 1919) in favour of Béla Kun, a pro-Bolshevik who had been sent by Lenin and quickly seized power and established a revolutionary government.
Military conflicts
During the war, the Hungarian communists fought separate battles against troops from Czechoslovakia and Romania, and France was also highly involved diplomatically in the conflicts. By the war's final stage, more than 120,000 troops on both sides were involved.
Appealing to Hungarians with promises of regaining the land lost to neighboring countries within a week of his rise to power, Kun declared war upon Czechoslovakia as Hungarian forces invaded Upper Hungary on May 20, capturing southern territories within weeks. In the face of advancing Hungarian troops, the Allies began to put pressure on the Hungarian government, and within three weeks with Kun's assurances of Russian support failing to materialise, Hungary was forced to withdraw from the just-proclaimed Slovak Soviet Republic after Kun had been given an ultimatum by France, together with a guarantee that Romanian forces would retreat from Tiszántúl.
The Romanians disregarded the guarantees of the French leadership and remained on the eastern banks of the Tisza River. The Hungarian government, claiming to impose the will of the Allies on Romania and seeing that it would not be compelled by diplomatic solutions would not compel, resolved to clear the threat by military force once and for all. Hungary planned to throw the Romanians out of Tiszántúl, destroy the Romanian Army and even retake Transylvania. However, the Hungarian offensive was defeated by the Romanian Army, and despite all previous pledges, agreements, and guarantees, the Romanians crossed the Tisza and quickly advanced towards the Hungarian capital,Budapest. It fell on August 4, only three days before Kun escaped to Vienna. The destruction of the Hungarian Soviet Republic and the Romanian occupation of parts of Hungary proper, including Budapest in August 1919, ended the war.
The Romanian troops withdrew from Hungary in March 1920 after they had seized large amounts of goods from Hungary, which they regarded as war reparations.
Prekmurje and Yugoslav Clashes against Hungary
See also 1918 occupation of Međimurje and Creation of Yugoslavia
Shortly after Kingdom of Serbia had been liberated, the new Banat Republic was proclaimed on 1st of November, but because it could achieve control over most of the territory that it claimed, and the Belgrade Agreement of 15 November 1918 and the previous Allied mandates to Serbia had it for a takover, the Serbian Army entered the western and central parts of Banat (including Temeschwar) and abolished the republic. The Romanian Army entered the eastern part of the region. Bačka and Baranja were also handed over to provisional local Serbian administration that governed from Novi Sad.
Meanwhile a revolt erupted in several villages in the eastern Međimurje and quickly spread across the region among the population. The next day the revolt wa suppressed and some of the revolutionaries were executed. On 13 of November, the State of Slovenes, Croats and Serbs launched an attempt to capture Međimurje. Finally,on December 24, the Kingdom of Yugoslavia launched another offensive on Međimurje, which was successful and managed to take control all over Međimurje. The fighting in the region ended after the Yugoslav offensive.