Duchy of Carniola
In 1399, the territory came under the German family of Walsee, the last of whom sold the territory to the Habsburgs in 1465. The Habsburgs possessed it from 1466 to 1776, during which time Fiume was granted the status of a free city as part of the Duchy of Carniola.