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.
Principality of Hungary
The consolidation of the Hungarian state began during the reign of Géza. After the battle of Arcadiopolis, the Byzantine Empire was the main enemy of the Hungarians. The Byzantine expansion threatened the Hungarians, since the subjugated First Bulgarian Empire was in alliance with the Magyars at that time. The situation became more difficult for the principality when the Byzantine Empire and the Holy Roman Empire made an alliance in 972. In 973, twelve illustrious Magyar envoys, whom Géza had probably appointed, participated in the Diet held by Otto I, Holy Roman Emperor. Géza established close ties with the Bavarian court, inviting missionaries and marrying his son to Gisela, daughter of Duke Henry II. Géza of the Árpád dynasty, Grand Prince of the Hungarians, who ruled only part of the united territory, the nominal overlord of all seven Magyar tribes, intended to integrate Hungary into Christian Western Europe, rebuilding the state according to the Western political and social model. Géza's eldest son St Stephen (István, Stephen I of Hungary) became the first King of Hungary after defeating his uncle Koppány, who also claimed the throne. The unification of Hungary, the foundation of the Christian state and its transformation into a European feudal monarchy was accomplished by Stephen.