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.
Árpád dynasty
The Grand Prince Stephen was crowned on December 25, 1000, or January 1, 1001), becoming the first King of Hungary (1000–1038) and founder of the state. He unified the Carpathian Basin under his rule by 1030, subjugating the territories of the Black Magyars and the domains that had been ruled by (semi-)independent local chieftains ("e.g.", by the "Gyula" Prokuj, Ajtony). He introduced the administrative system of the kingdom, based on counties "(comitatus)", and founded an ecclesiastic organization with two archbishoprics and several bishoprics. Following the death of his son, Emeric (September 2, 1031), King Stephen I assigned his sister's son, the Venetian Peter Orseolo as his heir which resulted in a conspiracy led by his cousin, Vazul, who had been living imprisoned in Nyitra (today "Nitra" in Slovakia). Vazul was blinded on King Stephen's order and his three sons (Levente, Andrew and Béla) were exiled.