The Hungarian Soviet Republic, also known as the Socialist Federative Soviet Republic of Hungary was a short-lived state that existed from 21 March 1919 to 1 August 1919 (133 days), succeeding the First Hungarian Republic. The Hungarian Soviet Republic was a small rump state run by communists and socialists which, at its time of establishment, controlled approximately only 23% of Hungary's historic territory. The head of government was Sándor Garbai, but the influence of Béla Kun of the Party of Communists in Hungary was much stronger. Unable to reach an agreement with the Triple Entente, which maintained an economic blockade of Hungary, in dispute with neighboring countries over territorial disputes, and beset by profound internal social changes, the Hungarian Soviet Republic failed in its objectives and was abolished a few months after its existence. Its main figure was the Communist Béla Kun, despite the fact that in the first days the majority of the new government consisted of radical Social Democrats. The new system effectively concentrated power in the governing councils, which exercised it in the name of the working class.
The new Communist government failed to reach an agreement with the Triple Entente that would lead to the lifting of the economic blockade, the improvement of the new borders or the recognition of the new government by the victorious powers of World War I. A small volunteer army was organized mostly from Budapest factory workers and attempts were made to recover the territories lost to neighboring countries, an objective that had widespread support from many working-class people in some larger cities, not only those favorable to the new regime. Initially, thanks to patriotic support from conservative officers, the republican forces advanced against the Czechoslovaks in north Hungary, after suffering a defeat in the east at the hands of the Romanian Army in late April, which led to a retreat on the banks of the Tisza. In mid-June, the birth of the Slovak Soviet Republic was proclaimed, which lasted two weeks until a Hungarian withdrawal at the request of the Triple Entente. Later that month, there was an attempted coup by the Social Democrats of Budapest, which was retaliated by the communist government. On 20 July, the republic launched a new attack on the Romanian posts who were deep in Hungary at the Tisza river. After a few days of the Hungarian advance, the Romanians managed to stop the offensive and break through the Hungarian lines. Kun and most of the government fled to Vienna. The Social-Democrat–Communist government was succeeded by an exclusively Social Democratic one on 1 August. The communists left Budapest and went abroad. Despite the opposition from the Entente, the Romanians entered Budapest, the Hungarian capital, on 4 August.