The country has been regarded by some historians to have been a client state of Germany from 1938 to 1944. The Kingdom of Hungary under Horthy was an Axis Power during most of World War II. In 1944, after Horthy's government negotiated secretly with the Allies, and considered to leave the war as well, Hungary was occupied by Nazi Germany and Horthy was deposed. The Arrow Cross Party's leader Ferenc Szálasi established a new Nazi-backed government, effectively turning Hungary into a German-occupied puppet state.
After World War II, Hungary fell within the Soviet Union's sphere of interest. In 1946, the Second Hungarian Republic was established under Soviet influence. In 1949, the communist Hungarian People's Republic was founded.
Upon the dissolution and break-up of Austria-Hungary after World War I, the Hungarian Democratic Republic and then the Hungarian Soviet Republic were briefly proclaimed in 1918 and 1919, respectively. The short-lived communist government of Béla Kun launched what was known as the "Red Terror", involving Hungary in an ill-fated war with Romania. In 1920, the country fell into a period of civil conflict, with Hungarian anti-communists and monarchists violently purging the nation of communists, leftist intellectuals, and others whom they felt threatened by, especially Jews. This period was known as the "White Terror". In 1920, after the pullout of the last of the Romanian occupation forces, the Kingdom of Hungary was restored.
On February 29, 1920, a coalition of right-wing political forces united and returned Hungary to being a constitutional monarchy. However, it was obvious that the Allies would not accept any return of Charles IV. With civil unrest too great to choose a new king, it was decided to select a regent to represent the monarchy. Miklós Horthy, the last commanding admiral of the Austro-Hungarian Navy, was chosen for this position on 1 March. Sándor Simonyi-Semadam was the first Prime Minister of Horthy's regency.
Horthy's rule as Regent possessed characteristics such that it could be construed a dictatorship. As a counterpoint, his powers were a continuation of the constitutional powers of the King of Hungary, adopted earlier during the federation with the Austrian Empire. As Regent, Horthy had the power to adjourn or dissolve the Hungarian Diet (parliament) at his own discretion; he appointed the Hungarian Prime Minister.
The succession after Horthy's death or abdication was never officially established; presumably the Hungarian Parliament would have selected a new regent, or possibly attempted to restore the Habsburgs under Crown Prince Otto. In January 1942, Parliament appointed Horthy's eldest son István as Deputy Regent and expected successor. Whether this represents an attempt to gradually re-establish monarchy in Hungary is unclear; at any rate, István was killed in an airplane crash in August that year, and a new Deputy Regent was not appointed.
During his first ten years, Horthy led increased repression of Hungarian minorities. In 1920, the numerus clausus law formally placed limits on the number of minority students at university, and legalized corporal punishment. Although the law seemingly applied in equal measure to all minorities, the ethnicity quota system was never fully introduced and the law acted largely to conceal anti-Jewish action from foreign observers. Limitations were relaxed in 1928. Racial criteria in admitting new students were removed and replaced by social criteria. Five categories were set up: civil servants, war veterans and army officers, small landowners and artisans, industrialists, and the merchant classes. Under István Bethlen as Prime Minister the electoral system was changed to reintroduce an open vote system outside Budapest and its vicinity and cities with county municipal rights. His political party, the Party of Unity, won repeated elections. Bethlen pushed for revision of the Treaty of Trianon. After the collapse of the Hungarian economy from 1929 to 1931, national turmoil pushed Bethlen to resign as Prime Minister. In 1938 the changes to the electoral system were reversed.