Venice eventually prevailed and during the early modern period Split remained a Venetian city, a heavily fortified outpost surrounded by Ottoman territory. Its hinterland was won from the Ottomans in the Morean War of 1699, and in 1797, as Venice fell to Napoleon, the Treaty of Campo Formio rendered the city to the Habsburg Monarchy. In 1805, the Peace of Pressburg added it to the Napoleonic Kingdom of Italy and in 1806 it was included in the French Empire, becoming part of the Illyrian Provinces in 1809. After being occupied in 1813, it was eventually granted to the Austrian Empire following the Congress of Vienna, where the city remained a part of the Austrian Kingdom of Dalmatia until the fall of Austria-Hungary in 1918 and the formation of Yugoslavia. In World War II, the city was annexed by Italy, then liberated by the Partisans after the Italian capitulation in 1943. It was then re-occupied by Germany, which granted it to its puppet Independent State of Croatia. The city was liberated again by the Partisans in 1944, and was included in the post-war Socialist Yugoslavia, as part of its republic of Croatia. In 1991, Croatia seceded from Yugoslavia amid the Croatian War of Independence.