Hungarian Defence Forces
In April 1867, the Austro-Hungarian Empire was established. Franz Josef, the head of the ancient Habsburg dynasty, was recognized as both Emperor of Austria and King of Hungary. Nevertheless, the issue of what form the Hungarian military would take remained a matter of serious contention between Hungarian patriots and Austrian leaders. As the impasse threatened the political union, Emperor Franz Josef ordered a council of generals in November of the same year. Ultimately, the leaders resolved on the following solution: in addition to the joint (k.u.k.) army, Hungary would have its own defence force, whose members would swear their oath to the King of Hungary (who was also Emperor of Austria) and the national constitution, use the Hungarian language of command, and display their own flags and insignia. (Austria would also form its own parallel national defence force, the "Landwehr".) As a result of these negotiations, on 5 December 1868, the Royal Hungarian Landwehr ("Magyar Kiralyi Honvédség", or Defence Force) was established.
Austro-Hungarian Compromise of 1867
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 in December 1526.
The Ottomans were subsequently driven out of Hungary by 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.