After two centuries of war, Trieste came with the signing of a peace treaty on 30 October 1370 in front of St. Bartholomew's Church in the village of Šiška (apud Sisciam) (now part of Ljubljana) under the Republic of Venice.
[2] Discontent with the patriarch's rule, the main citizens of Trieste in 1382 petitioned Leopold III of Habsburg, Duke of Austria to become part of his domains, in exchange for his defence.
[2] This united Charlemagne's southern marches under Habsburg rule,[3] subsequently consolidated as the Austrian Littoral (German: Österreichisches Küstenland).
Following an unsuccessful Habsburg invasion of Venice in the prelude to the War of the League of Cambrai, the Venetians occupied Trieste again in 1508, and under the terms of the peace were allowed to keep the city.
With their acquisition by the Habsburgs, Carniola and the Julian March ceased to act as an east-facing outpost of Italy against the unsettled peoples of the Danube basin, becoming a region of contact between the land-based Austrian domains and the maritime republic of Venice, whose foreign policy depended on control of the Adriatic.
[3] Austro-Venetian rivalry over the Adriatic weakened each state's efforts to repel the Ottoman Empire's expansion into the Balkans (which caused many Slavs to flee into the Küstenland, sowing the seeds of future Yugoslav union), and paving the way for the success of Napoleon's invasion.
The restoration of Istria to the Austrian Empire was confirmed at the Congress of Vienna, but a nationalistic feud began to develop between the Slavs and the Italians.
At the beginning of the 20th century, Trieste was a buzzing cosmopolitan city frequented by artists and philosophers such as James Joyce, Italo Svevo, Sigmund Freud, Dragotin Kette, Ivan Cankar, Scipio Slataper, and Umberto Saba.
Together with Trento, Trieste was a main focus of the irredentist movement,[10] which aimed for the annexation to Italy of all the lands they claimed were inhabited by an Italian-speaking population.
[11] After the end of World War I, the Austro-Hungarian Empire dissolved, and many of its border areas, including the Austrian Littoral, were disputed among its successor states.
If the Liberal governments ruling Italy at time granted Trieste of its ancient autonomy, maintained most of former Austrian laws, and simply gave a new name to the Austrian Littoral as Julian March (Italian: Venezia Giulia) without any other legal change,[clarification needed] Fascist violence which occurred to Socialists and Christian Democrats in other parts of Italy, were suffered by Slovene organizations in Trieste.
The period of violent persecution of Slovenes began with riots on 13 April 1920, which were organized as a retaliation for the assault on Italian occupying troops in Split by the local Croatian population.
While Triestine was spoken by the largest part of the population, German was the language of the Austrian bureaucracy and Slovene was predominant in the surrounding villages.