Koper (kôˈpĕr) [key], Ital. Capodistria, town (1991 pop. 24,704), in Slovenia, on the Istrian peninsula in the Gulf of Trieste. It is a fishing port and has salt mines and a radio factory. From 1278 until 1797 the town was the capital of Istria under Venetian rule. The Treaty of Campo Formio, which dissolved the republic of Venice, transferred Koper to Austria. The town passed to Italy after World War I and became part of the Free Territory of Trieste in 1947. In 1954, Koper was annexed to Yugoslavia and incorporated into the constituent republic of Slovenia. It preserves the aspect of a Venetian town, with a Romanesque cathedral and campanile, a Gothic loggia, and a pinnacled town hall.