Ljubljana is the capital and largest city of Slovenia. It has been the cultural, educational, economic, political and administrative centre.
During antiquity, a Roman city called Emona stood in the area. Ljubljana itself was first mentioned in the first half of the 12th century. Situated at the middle of a trade route between the northern Adriatic Sea and the Danube region, it was the historical capital of Carniola, one of the Slovene-inhabited parts of the Habsburg Monarchy. It was under Habsburg rule from the Middle Ages until the dissolution of the Austro-Hungarian Empire in 1918. After World War II, Ljubljana became the capital of the Socialist Republic of Slovenia, part of the Socialist Federal Republic of Yugoslavia. It retained this status until Slovenia became independent in 1991 and Ljubljana became the capital of the newly formed state.
The city, with an area of 163.8 square kilometers (63.2 sq mi), is situated in the Ljubljana Basin in Central Slovenia, between the Alps and the Karst. Ljubljana is located some 320 kilometers (200 mi) south of Munich, 477 kilometers (296 mi) east of Zürich, 250 kilometers (160 mi) east of Venice, 350 kilometers (220 mi) southwest of Vienna, 224 kilometers (139 mi) south of Salzburg and 400 kilometers (250 mi) southwest of Budapest. The extent of Ljubljana has changed considerably in the past 40 years, mainly because some of the nearby settlements have merged with Ljubljana.
The city stretches out on an alluvial plain dating to the Quaternary era. The mountainous regions nearby are older, dating from the Mesozoic (Triassic) or Paleozoic. A number of earthquakes have devastated Ljubljana, including in 1511 and 1895.
Ljubljana has an elevation of 295 meters (968 ft) The city centre, located along the Ljubljanica River, has an elevation of 298 meters (978 ft). Ljubljana Castle, which sits atop Castle Hill (Grajski grič) south of the city centre, has an elevation of 366 meters (1,201 ft). The highest point of the city, called Grmada, reaches 676 meters (2,218 ft), 3 meters (9.8 ft) more than the nearby Mount Saint Mary (Šmarna gora) peak, a popular hiking destination. These are located in the northern part of the city.