{ { Infobox military conflict
| conflict = Hungarian–Czechoslovak war
| image = Nepkoztarsasag.png
| caption = Territory recovered by the Hungarian Soviet Republic (light red) in today Slovakia and minor parts in today Hungary, in May–June 1919 | date = November 1918 – 23 June 1919 | place = present-day Slovakia, Carpathian Ruthenia, Hungary | partof = the 1918–20 revolutions and interventions in Hungary | territory = | result = Czechoslovak victory Hungarian retreat after diplomatic negotiations with the Entente Formation and then dissolution of the Slovak Soviet Republic | combatant1 = (until 21 March 1919)(from 21 March 1919)Supported by: | combatant2 = Hungarian anti communistsSupported by:| commander1 = Béla Kun Aurél Stromfeld Vilmos Böhm | commander2 = Tomáš Masaryk František Schöbl Josef Štika Josef Šnejdárek Josef Votruba | strength1 = 80,000 | strength2 = 20,000 | casualties1 = unknown dead~450 captured | casualties2 = 864 | notes = | campaignbox = }} The Hungarian–Czechoslovak War, or Northern Campaign (), was fought between the Hungarian Soviet Republic and the First Czechoslovak Republic from April to June 1919.
Background
At the end of 1918, the final year of World War I, the collapse of Austria-Hungary led to the declaration of independence of Czechoslovakia. The newly-proclaimed state, wanting to ensure the success of its territorial demands, started an attack.
During the war, the Hungarian Red Army fought separate battles against troops from Czechoslovakia and Romania, and France was also highly involved diplomatically in the conflicts, too. By the war's final stage, more than 120,000 troops on both sides had become involved.
Appealing to Hungarians with promises of regaining the land lost to neighbouring countries within a week of his rise to power, Béla Kun declared war upon Czechoslovakia. That increased Kun's domestic support by making good on his promise to restore Hungary's borders. The Hungarian Army recruited men aged between 19 and 25. Industrial workers from Budapest volunteered, and many former Austro-Hungarian officers re-enlisted through patriotism. The Hungarian army moved its 1st and 5th artillery divisions (40 battalions) to Upper Hungary (partially modern day Slovakia). The Hungarian counterattack launched on May 9, 1919 in the area of Hatvan. On May 20, 1919, Colonel Aurél Stromfeld, attacked in force and routed Czechoslovak troops from Miskolc (Miškovec), also recapturing Košice and Prešov (Eperjes), thus successfully separated the Czechoslovak and Romanian Armies from each other. Through that successful action, Hungary controlled territory up to its old northern borders and regained control of industrial areas around Miskolc, Salgótarján and Banská Štiavnica (Selmecbánya).
Proclamation of Slovak Soviet Republic and moral collapse of army
Despite the communists' promises on the restoration of the former borders of Hungary, they declared the establishment of the independent Slovak Soviet Republic in Prešov on 16 June 1919. After that proclamation, the Hungarian nationalists and patriots soon realized that the new communist government had no intentions to recapture the lost territories, only to spread communist ideology and establish other communist states in Europe, and was thus sacrificing Hungarian national interests. Despite the series of military victories against the Czechoslovak Army, the Hungarian Red Army started to disintegrate because of the fundamental tension between patriots and communists during the establishment of the Slovak Soviet Republic, and that concession shook the popular and military support of the communist government, particularly among professional military officers, patriots and nationalists in the Hungarian Red Army. In fact, even the chief of the general staff, Aurél Stromfeld, resigned his post in protest.
Turnaround of combat
Meanwhile, the Czechoslovak Army had changed. The few unreliable Italian commanders were replaced by French generals and officers. The head of the newly organized Czechoslovak 2nd Infantry Division was the French Legion Colonel and veteran Foreign Legion Josef Šnejdárek. Battalions and regiments broken in previous battles were formed and, along with new units, receded in mountainous terrain from one defensive line to another. It was enough for a week for Šnejdárek to consolidate subordinate troops and prepare them for offensive actions.