Karlskrona naval base is the largest naval base of the Swedish Navy. Located in Blekinge in southern Sweden, the base has close ties with the city of Karlskrona. It has an exceptionally well-sheltered location: arcs of islands provide a strong defense not only from the sea but also from land attacks. Two of Sweden's three naval warfare flotillas are based there. It contains the Marinmuseum and the Ropewalk (Repslagarbanan), the longest wooden building in the country.
After Sweden and Denmark ceased hostilities after the Scanian War (1675–1679), King Charles XI of Sweden made a reconnaissance trip in the eastern part of the Blekinge archipelago. The king decreed the construction of a city named "Carlscroona" on the island of Trossön. The major reason for its establishment was to provide the Swedish Navy with a permanent base closer to Denmark, which throughout the 17th century had been the foremost enemy of Sweden. In addition, a shipyard was needed for both construction and repair of ships, as well as for supply depots and barracks. The new base had the added advantage of being free of ice in winter, unlike the base in Stockholm which had until then been the principal base of the navy. A plan for the base was laid forth by quartermaster general Erik Dahlbergh in 1683, and construction was started two years later. The new city of Karlskrona received its city privileges in 1680.
An international incident occurred on October 27, 1981, when the Soviet submarine S-363 ran aground approximately 10 km from Karlskrona, in an event sometimes called "Whiskey on the rocks".