 After the 13th century the new village, now grown to the status of city, pronounced itself a municipality and defined its territory as bordering with those of Trieste and Koper, but stayed still politically bound to the Patriarchy of Aquileia.From this period are the cathedral and the city hall, the latter having been rebuilt in the last century.In 1420 it became part of the Republic of Venice.