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.
History of Hungary
The Magyars were Christianized at the end of the 10th century, and the Christian Kingdom of Hungary was established in AD 1000, 
ruled by the Árpád dynasty for the following three centuries.
In the high medieval period, the kingdom expanded beyond Pannonia, to the Adriatic coast. In 1241 during the reign of Béla IV, Hungary was invaded by the Mongols under Batu Khan. The Hungarians were decisively defeated at the Battle of Mohi by the outnumbered Mongol army. King Béla fled to the Holy Roman Empire and left the Hungarian population under the mercy of the Mongols. In this invasion more than 500,000 Hungarian population were massacred and the whole kingdom reduced to ashes.
After the extinction of the Árpád dynasty in 1301, the late medieval kingdom persisted, albeit no longer under Hungarian monarchs, and gradually reduced due to the increasing pressure by the expansion of the Ottoman Empire. Hungary bore the brunt of the Ottoman wars in Europe during the 15th century. The peak of this struggle took place during the reign of Matthias Corvinus (r. 1458–1490). The Ottoman–Hungarian wars concluded in significant loss of territory and the partition of the kingdom after the Battle of Mohács of 1526.