Koper is a city in southwestern Slovenia, with the other Slovenian coastal towns Ankaran, Izola, Piran, and Portoroz, situated along the country's 47-kilometre (29-mile) coastline, in the Istrian Region, approximately five kilometres (3.1 miles) from its border with Italy. Having a unique ecology and biodiversity, it is considered an important national natural resource. With only one percent of Slovenia having a coastline, the influence that the city's Port of Koper, which is also the major contributor to the economy of the eponymous city municipality, has on tourism was a factor in deciding Ankaran to leave the municipality with a referendum in 2011. Koper is the main urban center of the Slovenian Istria with a population of about 25,000.
The city of Koper is officially bilingual, with both Slovene and Italian as official languages. Sights in Koper include the 15th-century Praetorian Palace and Loggia in Venetian Gothic style, the 12th-century Carmine Rotunda church, and the Cathedral of St Nazarius, with its 14th-century tower.
Koper is also one of the main road entry points into Slovenia from Italy, which lies to the north of the municipality. The main motorway crossing is at Spodnje Skofije to the north of the city of Koper. The motorway continues into Rabuiese and Trieste. Koper also has a rail connection with the capital city, Ljubljana. On the coast, there is a crossing at Lazaret into Lazaretto in Muggia municipality in Trieste province.