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.
Austria–Germany relations
In 1867, the new North German Confederation was declared by Bismarck. After Prussia's victory in the Franco-Prussian War in 1870, in which Prussian army entered and marched over Paris, Bismarck announced the creation of the German Empire and excluded Austria-Hungary solely in this unified Germany. Austria-Hungary then turned its imperial ambitions to the Balkan Peninsula; whereas the German Empire focused on building armaments in a race against the United Kingdom (Britain and Ireland). Nevertheless, both the German Empire and Austria-Hungary forged a military alliance with the Kingdom of Italy, forming the Triple Alliance (1882).
In the 1910s, Austria-Hungary's ambition of turning Serbia into its protectorate facilitated the Assassination of Archduke Franz Ferdinand (1914), heir to Austria-Hungary's throne. When Austria-Hungary stirred up excuses for a war (First World War) against Serbia, Germany, claiming the Alliance's terms of passive military defence instead of downright aggression, reluctantly entered the war on Austria-Hungary's side.