An ancient Roman port and settlement known as Haliaetum stood to the southwest of the present town, next to the village of Jagodje, as early as the 2nd century BC. The town of Izola was established on a small island by refugees from Aquileia in the 7th century. The coastal areas of Istria came under Venetian influence in the 9th century. The settlement was first mentioned in writing as Insula in a Venetian document entitled Liber albus in 932AD. It became definitely the territory of the Republic of Venice in 1267, and the centuries of Venetian rule left a strong and enduring mark on the region. The Venetian part of the peninsula passed to the Holy Roman Empire of the German Nation in 1797 with the Treaty of Campo Formio, until the period of Napoleonic rule from 1805 to 1813 when Istria became part of the Illyrian provinces of the Napoleonic Empire. After this short period, during which Izola's walls were torn down and used to fill in the channel that separated the island from the mainland, the newly established Austrian Empire ruled Istria until November 1918. The treaty of Saint Germain assigned Izola and the rest of the Istria region to Italy. The Italian-speaking population was the majority according to the Austro-Hungarian census of 1900: of 5,363 inhabitants, 5,326 spoke Italian, 20 Slovene, and 17 German. Istria became part of the Kingdom of Italy, until Italian capitulationin September 1943, whereupon control passed to Germany. Izola was liberated by a naval unit from Koper at the end of April 1945. After the end of World War II, Izola was part of Zone B of the provisionally independent Free Territory of Trieste; after the de facto dissolution of the Free Territory in 1954 it was incorporated into Slovenia, then a part of Yugoslavia. The newly defined Italo-Yugoslav border saw the migration of many people from one side to the other. In Izola's case, many Italian speakers chose to leave, and in their place Slovenian-speaking people from neighbouring villages settled in the town. In 1820, a thermal spring was discovered in Izola, leading to the town's earliest forms of tourism. Between 1902 and 1935 the Parenzana, a narrow-gauge railway line connected the town to Trieste and Poreč.