Ljubljana (; —; , , or Aemona) is the capital and largest city of Slovenia and its only centre of international importance. It is located in the centre of the country in the Ljubljana Basin, and is the centre of the City Municipality of Ljubljana. With approximately 272,000 inhabitants, it classifies as the only Slovenian large town. Throughout its history, it has been influenced by its geographic position at the crossroads of the Slavic world with the Germanic and Latin cultures.
For centuries, Ljubljana was the capital of the historical region of Carniola. Now it is the cultural, educational, economic, political and administrative centre of Slovenia, independent since 1991. Its transport connections, concentration of industry, scientific and research institutions and cultural tradition are contributing factors to its leading position.
Around 2000 BC, the Ljubljana Marshes in the immediate vicinity of Ljubljana were settled by people living in pile dwellings. These lake-dwelling people lived through hunting, fishing and primitive agriculture. To get around the marshes, they used dugout canoes made by cutting out the inside of tree trunks. Their archeological remains, nowadays in the Municipality of Ig, have been designated a UNESCO World Heritage Site since June 2011, in the common nomination of six Alpine states.
Later, the area remained a transit point for numerous tribes and peoples, among them Illyrians, followed by a mixed nation of Celts and Illyrians called the Iapydes, and then in the 3rd century BC a Celtic tribe, the Taurisci.
Around 50 BC, the Romans built a military encampment that later became a permanent settlement called Iulia Aemona. This entrenched fort was occupied by the Legio XV Apollinaris. In 452, it was destroyed by the Huns under Attila's orders, and later by the Ostrogoths and the Lombards. Emona housed 5,000–6,000 inhabitants and played an important role during numerous battles. Its plastered brick houses, painted in different colours, were already connected to a drainage system. In the 6th century, the ancestors of the Slovenes moved in. In the 9th century, the Slovenes fell under Frankish domination, while experiencing frequent Magyar raids. Not much is known about the area during the settlement of Slavs in the period between the downfall of Emona and the Early Middle Ages.
The area reappears in written sources in the 12th century. It was long thought that the first mention of Ljubljana dated to 1144. However, an even older mention has been found in the Udine Cathedral Archive on a parchment sheet named Nomina defunctorum (Names of the Dead). It dates from 1112 to 1125 and mentions the nobleman Rudolf of Tarcento, a laywer of the Patriarchate of Aquileia, who had bestowed a canon with 20 farmsteads beside the castle of Ljubljana (castrum Leibach) to the Patriarchate.
When exactly Ljubljana acquired its town rights is not known, but it was no later than 1220. At the time, the lords of Ljubljana Castle were from the Spanheim family, whereas the surrounding agrarian estate belonged to different noblemen, even counts. In 1270, Carniola and in particular Ljubljana was conquered by King Ottokar II of Bohemia. When he was in turn defeated by Rudolph of Habsburg, the latter took the town in 1278. Due to Rudolf's pledge, Ljubljana was under the administration of the Counts of Gorizia from 1279 until 1335, and became the capital city of Carniola. Then it came under Habsburg rule again and was renamed Laibach. It would belong to the House of Habsburg until 1797.
In the 13th century, the town was composed of three districts: Old Square and "Town" (around the Romanesque church of Saint Nicholas) at the right bank, and New Square at the left bank of the Ljubljanica. The first-mentioned is thought to have obtained the right to hold a market at around 1200, which does not necessarily mean that it is the oldest district among the three. All the three got a city wall. The banks were linked by the Lower or Hospital Bridge and the Butchers' Bridge upstream it. Buildings were mainly made of wood, and seven fires erupted in the city in the Middle Ages. Artisans organised themselves into guilds. The Teutonic Knights, the Conventual Franciscans, and the Franciscans settled in the town.
In the 15th century, Ljubljana became recognised for its art, particularly painting and sculpture. The Diocese of Ljubljana was established in 1461 and the Church of St. Nicholas became a cathedral. After an earthquake in 1511, the city was rebuilt in Renaissance style and a new wall was built around it. Wooden buildings were forbidden after a large fire at New Square in 1524.
In the 16th century, the population of Ljubljana numbered 5,000, 70% of whom spoke Slovene as their first language, with most of the rest using German. The Protestant Reformation gained ground in the city. Several important Lutheran preachers, who set the foundations to the Slovene literature and nation, lived and worked in Ljubljana, including Primož Trubar, Adam Bohorič and Jurij Dalmatin. The first secondary school, public library and printing house opened in Ljubljana. Ljubljana became an important educational centre.
In 1597, Jesuits arrived in the city, followed in 1606 by Capuchins, to eradicate Protestantism. Only 5% of all the residents of Ljubljana at the time were of Catholic confession, so it took quite a while to make it again Catholic. Jesuits organised the first theatrical productions in the town, fostered the development of Baroque music and organised Catholic schools. In the middle and the second half of the 17th century, foreign architects built and renovated numerous monasteries, churches, and palaces in Ljubljana and introduced the Baroque architecture. In 1702, the Ursulines settled in the town, where, the following year, they opened the first public school for girls in the Slovene Lands. Some years later, the construction of the Ursuline Church of the Holy Trinity started. In 1779, St. Christopher's Cemetery replaced the cemetery at St. Peter's Church as the main Ljubljana cemetery.
The Napoleonic interlude saw Ljubljana as "Laybach" become, from 1809 to 1813, the capital of the Illyrian Provinces. In 1815, the city became Austrian again and from 1816 to 1849 was the administrative centre of the Kingdom of Illyria in the Austrian Empire. In 1821 it hosted the Congress of Laibach, which fixed European political borders for years to come. The first train arrived in 1849 from Vienna and in 1857 the line was extended to Trieste.
In 1895, Ljubljana, then a city of 31,000, suffered a serious earthquake measuring 6.1 degrees Richter and 8–9 degrees MCS. Some 10% of its 1,400 buildings were destroyed, although casualties were light. During the reconstruction that followed, a number of districts were rebuilt in the Vienna Secession style. Public electric lighting appeared in the city in 1898. The rebuilding period between 1896 and 1910 is referred to as the "revival of Ljubljana" because of architectural changes from which a great deal of the city dates back to today and for reform of urban administration, health, education and tourism that followed. The rebuilding and quick modernization of the city were led by the mayor Ivan Hribar.
In 1918, following the end of World War I and the dissolution of Austria-Hungary, the region joined the Kingdom of Serbs, Croats and Slovenes. In 1929, Ljubljana became the capital of the Drava Banovina, a Yugoslav province.
In 1941, during World War II, Fascist Italy occupied the city, and on 3 May 1941 made "Lubiana" the capital of an Italian "Provincia di Lubiana" with the former Yugoslav general Leon Rupnik as mayor. After the Italian capitulation, Nazi Germany with SS-general Erwin Rösener and Friedrich Rainer took control in 1943 but formally the city remained the capital of an Italian province until 9 May 1945. In Ljubljana, the occupying forces established strongholds and command centres of Quisling organisations, the Anti-Communist Volunteer Militia under Italy and the Home Guard under German occupation. The city was surrounded by over of barbed wire to prevent co-operation between the resistance movement that operated within and outside the fence. Since 1985, a commemorative path has ringed the city where this iron fence once stood.