The Austro-Hungarian Compromise of 1867 (, ) established the dual monarchy of Austria-Hungary, which was a military and diplomatic alliance of the two sovereign states. The Compromise only partially re-established the former pre-1848 sovereignty and status of the Kingdom of Hungary, being separate from, and no longer subject to, the Austrian Empire. The compromise put an end to the 18-year-long military dictatorship and absolutist rule over Hungary which Emperor Franz Joseph had instituted after the Hungarian Revolution of 1848. The territorial integrity of the Kingdom of Hungary was restored. The agreement also restored the old historic constitution of the Kingdom of Hungary.

Hungarian political leaders had two main goals during the negotiations. One was to regain the traditional status (both legal and political) of the Hungarian state, which had been lost after the Hungarian Revolution of 1848. The other was to restore the series of reform laws (the so-called April Laws) of the revolutionary parliament of 1848, which were based on the 12 points that established modern civil and political rights and economic and societal reforms in Hungary. The April Laws of the Hungarian revolutionary parliament (with the exception of the laws based on the 9th and 10th points) were restored by Franz Joseph.

Under the Compromise, the lands of the House of Habsburg were reorganized as a real union between the Austrian Empire and the Kingdom of Hungary, headed by a single monarch who reigned as Emperor of Austria in the Austrian half of the empire, and as King of Hungary in the Kingdom of Hungary. The Cisleithanian (Austrian) and Transleithanian (Hungarian) states were governed by separate parliaments and prime ministers. The two countries conducted unified diplomatic and defense policies. For these purposes, common ministries of foreign affairs and defense were maintained under the monarch's direct authority, as was a third finance ministry responsible only for financing the two common portfolios.

The relationship of Hungary to Austria before the 1848 revolution had been personal union, whereas after the compromise of 1867 its status was reduced to partnership in a real union.Ádám Kolozsi: (in Hungarian) Deadly threats and treason 150 years ago: front lines and marketing around Austro-Hungarian compromise. LINK: Thus Hungarian society widely considered the compromise as a betrayal of the vital Hungarian interests and the achievements of the reforms of 1848. The compromise remained bitterly unpopular among ethnic Hungarian voters:Cieger András. Kormány a mérlegen – a múlt században ethnic Hungarians did not generally support the ruling Liberal Party in Hungarian parliamentary elections. Therefore, the political maintenance of the Austro-Hungarian Compromise, and thus Austria-Hungary itself, was mostly a result of the popularity of the pro-compromise ruling Liberal Party among ethnic minority voters in the Kingdom of Hungary.

According to Emperor Franz Joseph I of Austria, "There were three of us who made the agreement: Deák, Andrássy and myself."Kozuchowski, Adam. The Afterlife of Austria-Hungary: The Image of the Habsburg Monarchy in Interwar Europe. Pitt Series in Russian and East European Studies. University of Pittsburgh Press (2013), . p. 83

Historical background 1526–1848

In the Middle Ages, the Duchy of Austria was an autonomous state within the Holy Roman Empire, ruled by the House of Habsburg, and the Kingdom of Hungary was a sovereign state outside the empire. In 1526, Hungary was defeated and partially conquered by the Ottoman Empire. King Louis II of Hungary and Bohemia had no legitimate heir and died young in the Battle of Mohács. Louis II's brother-in-law, Ferdinand I of Habsburg, was elected King of Hungary by a rump Parliament in Pozsony (now Bratislava) in December 1526. The Ottomans were subsequently driven out of Hungary by the cooperation of international Western Christian forces led by Prince Eugene of Savoy between 1686 and 1699. From 1526 to 1804, Hungary was ruled by the Habsburg dynasty as kings of Hungary, but remained nominally and legally separate from the other lands of the Habsburg monarchy. Unlike other Habsburg-ruled areas, the Kingdom of Hungary had an old historic constitution, which limited the power of the Crown and had greatly increased the authority of the parliament since the 13th century. The Golden Bull of 1222 was one of the earliest examples of constitutional limits being placed on the powers of a European monarch,Francis Fukuyama: What's Wrong with Hungary? which was forced on the Hungarian king in much the same way King John of England was made to sign the Magna Carta.

The Hungarian parliament was the most important political assembly since the 12th century, which emerged to the position of the supreme legislative institution in the Kingdom of Hungary from the 1290s.Elemér Hantos: The Magna Carta of the English And of the Hungarian Constitution (1904) Royal decrees were kept inferior to acts of parliament; as such, they could not contravene statutory laws or the cardinal tenets of the historical constitution.

In 1804, Francis II, Holy Roman Emperor, who was also ruler of the lands of the Habsburg monarchy, founded the Empire of Austria in which most his so-called Erblande lands were included. However the new Erblande term was not applied to Kingdom of Hungary. In doing so he created a formal overarching structure for the Habsburg Monarchy, which had functioned as a composite monarchy for about 300 years. (Composite states/monarchies were the most common / dominant form of states in early modern era Europe.) The Holy Roman Empire was abolished in 1806. The Kingdom of Hungary had always been considered a separate realm, the country's status was affirmed by Article X, which was added to Hungary's constitution in 1790 during the phase of the composite monarchy; it described the state as a Regnum Independens. From the perspective of the Court since 1723, regnum Hungariae had been a hereditary province of the dynasty's three main branches on both lines. From the perspective of the ország (the country), Hungary was regnum independens, a separate Land as the above-mentioned Article X of 1790 stipulated. The Court reassured the diet, however, that the assumption of the monarch's newly adopted title (Emperor of Austria) did not in any sense affect the laws and the constitution on the territory of Kingdom of Hungary."Vor dem Jahr 1848 is[t] das Kaisertum Österreich verfassungsrechtlich als ein monarchischer Einheitsstaat auf differenziert föderalistischer Grundlage zu sehen, wobei die besondere Stel[l]ung Ungarns im Rahmen dieses Gesamtstaates stets offenkundig war. Eine weitere Differenzierung der föderalistischen Grundlage erfolgte ab 1815 durch die Zugehörigkeit eines teiles des Kaisertums zum Deutschen Bund." "Before 1848 the Austrian Empire can be regarded in constitutional law as a unitary monarchy on a differentiated federalistic basis, whereby the special position of Hungary within the framework of this united state was always evident. A further differentiation of the federalistic position followed from 1815 through the affiliation of a part of the empire to the German federation."József Zachar, Austerlitz, 1805. december 2. A három császár csatája – magyar szemmel , In: Eszmék, forradalmak, háborúk. Vadász Sándor 80 éves, ELTE, Budapest, 2010 p. 557 Hungary's affairs continued to be administered by its own institutions (King and Diet and the local governments of its counties) as they had been previously. Thus, under the new arrangements, no Austrian imperial institutions were involved in its internal government. The Hungarian legal system and judicial system remained separated and independent from the unified legal and judicial systems of the other Habsburg ruled areas.

Accordingly, the administration and the structures of central government of Kingdom of Hungary also remained separate from the Austrian administration and Austrian government until the 1848 revolution. Hungary was governed to a greater degree by the Council of Lieutenancy of Hungary (the Gubernium) in Pressburg (Pozsony) and, to a lesser extent, by the Hungarian Royal Court Chancellery in Vienna, independent of the Imperial Chancellery of Austria.Balázs, Éva H. Hungary and the Habsburgs, 1765–1800: An Experiment in Enlightened Absolutism. p. 320.

From 1526 to 1851, the Kingdom of Hungary maintained its own customs borders, which separated Hungary from the united customs system of other Habsburg-ruled territories.

The involvement and integration of Kingdom of Hungary into a different state was legally impossible, due to the provisions of the old Hungarian constitution and Hungarian public law.

"At any time in the past, Hungary might have made peace with a power with which Austria was at war, if the kings had not falsified their oath by not assembling the Hungarian Parliament: for the Diet always had the lawful right of [declaring] War and Peace."Francis William Newman. Select Speeches of Kossuth.

The other serious problem for the Habsburgs was the traditionally highly autonomous counties of Hungary, which proved to be a solid and major obstacle in the construction of absolutism in Hungary. The counties were the centers of local public administration and local politics in Hungary, and they possessed a recognized right to refuse to carry out any "unlawful" (unconstitutional) royal orders. Thus, it was possible to question the legality of a surprisingly high proportion of the royal orders which emanated from Vienna.

While in most Western European countries (like France and the United Kingdom) the king's reign began immediately upon the death of his predecessor, in Hungary the coronation was absolutely indispensable as if it were not properly executed, the Kingdom stayed "orphaned". Even during the long personal union between the Kingdom of Hungary and other Habsburg-ruled areas, no Habsburg monarch could promulgate laws or exercise his royal prerogatives in the territory of Hungary until he had been crowned as King of Hungary.An account of this service, written by Count Miklós Bánffy, a witness, may be read at "The Last Habsburg Coronation: Budapest, 1916". From Theodore's Royalty and Monarchy Website. Since the Golden Bull of 1222, all Hungarian monarchs had to take a coronation oath during the coronation procedure, where the new monarchs had to agree to uphold the constitutional arrangement of the country, to preserve the liberties of his subjects and the territorial integrity of the realm.

Revolution and military dictatorship

April laws and fundamental reforms in Hungary

The April Laws, also known as 'March Laws', were a set of statutes enacted by Lajos Kossuth aimed at transforming the Kingdom of Hungary into a modern parliamentary democracy and nation-state. These laws were approved by the Hungarian Diet in March 1848 in Pozsony (Pressburg, now Bratislava, Slovakia) and were signed by king Ferdinand V at the Primate's Palace in the same city on 11 April 1848.

The April Laws completely abolished all privileges of the Hungarian nobility. In April 1848, Hungary became the third country in Continental Europe—following France (1791) and Belgium (1831)—to establish legislation for democratic parliamentary elections. The new suffrage law (Act V of 1848) replaced the feudal estates-based parliament (Estates General) with a democratic representative parliament, offering the broadest suffrage rights in Europe at that time.prof. András Gerő (2014): Nationalities and the Hungarian Parliament (1867-1918) LINK: The imperative program included Hungarian control over its popular national guard, the national budget, and foreign policy, as well as the abolition of serfdom.