Karlovac (kâːrloʋats) is a city in central Croatia. According to the 2021 census, its population was 49.377.
Karlovac is the administrative centre of Karlovac County. The city is located on the Zagreb-Rijeka highway and railway line, south-west of Zagreb and from Rijeka.
The city was named after its founder, Charles II, Archduke of Austria. The German name Karlstadt or Carlstadt ("Charlestown") has the equivalence in various languages: in Hungarian it is known as Károlyváros, in Italian as Carlovizza, in Latin as Carolostadium, and in Kajkavian dialect and Slovene as Karlovec.
The Austrians built Karlovac from scratch in 1579 in order to strengthen their southern defences against Ottoman encroachments. The establishment of a new city-fortress was a part of the deal between the Protestant nobility of Inner Austria and the archduke Charles II of Austria. In exchange for their religious freedom the nobility agreed to finance the building of a new fortress against the Ottoman Empire. It was founded as a six-pointed star fortress built on the Zrinski estate near the old town of Dubovac at the confluence of the Kupa and Korana rivers. As the city later expanded, the urban area reached as far as the Mrežnica and Dobra rivers. The star shape can still be seen around the town. It was originally known as Karlstadt ("Charles's Town" in German), after the ruling family, upon whose orders construction began on 13 July 1579. The architect of the city was Matija Gambon, whilst work on the new fortress was supervised by George Khevenhüller. It was intentionally built on terrain exposed to flooding and disease from unhealthy water, with the intent to hamper the Turkish advance.
The fortress itself was largely complete by September 1580, while moats and ramparts were finished later, between 1582 and 1589. The first church (of the Holy Trinity) was built in the central square in 1580, but all of the city buildings burned down in the fire of 1594. By 1610, moats and ramparts were repaired, and houses were rebuilt.