Austria-Hungary (also known as the Austro-Hungarian Empire, Austro-Hungarian monarchy or k.u.k. Monarchy), more formally known as the Kingdoms and Lands Represented in the Imperial Council and the Lands of the Holy Hungarian Crown of Saint Stephen, was a constitutional monarchic union between the crowns of the Austrian Empire and the Kingdom of Hungary in Central Europe. The union was a result of the Austro-Hungarian Compromise of 1867, under which the House of Habsburg agreed to share power with the separate Hungarian government, dividing the territory of the former Austrian Empire between them. The Austrian and the Hungarian lands became independent entities enjoying equal status. Austria-Hungary was a multinational realm and one of the world's great powers at the time. The dual monarchy existed for 51 years until it dissolved on 31 October 1918 before a military defeat on the Italian front of the First World War. The realm comprised otl Austria, Hungary, Bosnia and Herzegovina, Croatia, the Czech Republic, Slovakia, Slovenia, large parts of Serbia and Romania and smaller parts of Italy, Montenegro, Poland and Ukraine. The Habsburg monarch ruled as Emperor of Austria over the western and northern half of the country that was the Austrian Empire (Cisleithania or Lands represented in the Imperial Council) and as King of Hungary over the Kingdom of Hungary (Transleithania or Lands of the Crown of Saint Stephen) which enjoyed a great deal of sovereignty with only a few joint affairs (principally foreign relations and defence). The division was so marked in fact that there was no common citizenship: a person was either an Austrian or a Hungarian citizen (as nobody was allowed to hold both citizenships at the same time). Certain regions, such as Galicia (within Cisleithania) and Croatia (within Hungary) enjoyed special status with their own unique governmental structures (essentially a form of autonomy). The two capitals of the Monarchy were Vienna for Austria and Buda for Hungary, the latter united with neighbouring Pest as Budapest from 1870. Vienna, however, would serve as the nation's primary capital. Austria-Hungary was geographically the second largest country in Europe after the Russian Empire, and the third most populous (after Russia and the German Empire). The Cisleithan part contained about 57% of the combined realm's population and a larger share of its economic resources.