Friuli became Venetian territory in 1420, while Triest and Gorizia remained within the Holy Roman Empire. Pordenone was a "corpus separatum", under Austrian influence until 1515, when it also fell to Venetian rule. With the 1797 Peace treaty of Campoformido, the Venetian domination came to an end and Friuli was ceded to Austria. After the period of domination by Napoleon, which affected also Triest and Gorizia, it again became part of the Austrian Empire and was included in the Lombard-Veneto Kingdom. Gorizia was assigned to the Illyrian Kingdom, whereas Triest and Istria became part of the Austrian Coastal Region. Under the enlightened government and policies set by the Austrian Empire and continued by the Austrian-Hungarian Empire in the 18th and 19th centuries, Triest flourished, reaching an extraordinary economic development as the main harbour of the Habsburg empire. The war of independence led to the annexation of Friuli to the Kingdom of Italy.