Szczecinek (ʂt͡ʂɛˈt͡ɕinɛk; Neustettin) is a historic city in Middle Pomerania, northwestern Poland, with a population of more than 40,000 (2011). Formerly in the Koszalin Voivodeship (1950–1998), it has been the capital of Szczecinek County in the West Pomeranian Voivodeship since 1999. It is an important railroad junction, located along the main Poznań - Kołobrzeg line, which crosses less important lines to Chojnice and Słupsk. The town's total area is . The turbulent history of Szczecinek reaches back to the High Middle Ages, when the area was ruled by Pomeranian dukes and princes. The majority of the city's architecture survived World War II and, subsequently, its entire Old Town was proclaimed a national heritage monument of Poland. Szczecinek lies in eastern part of West Pomeranian Voivodeship. Historically, it was included within Western Pomerania. In 2010, the city boundaries were expanded as the town merged with the following villages in Gmina Szczecinek: Gałowo, Marcelin, Godzimierz, Turowo, Parsęcko, Buczek and Żółtnica. In the Middle Ages a Slavic stronghold existed in present-day Szczecinek. It was part of the early Polish state in the 10th century, and as a result of the 12th-century fragmentation of Poland, it became part of the separate Duchy of Pomerania. In 1310, the castle at the site of a former stronghold, and town were founded under Lübeck law by Duke Wartislaw IV of Pomerania and modelled after Szczecin (Stettin) which is situated about to the west. The initial name was "Neustettin" (Nowy Szczecin, Neustettin, Stetin Nova). It was also known as "Klein Stettin" (Mały Szczecin, Klein Stettin). In 1707 the town was known in Polish as Nowoszczecin, while the Mały Szczecin name gradually developed into the modern name Szczecinek. The town was fortified to face the Brandenburgers, with a wall and palisades. In 1356 it was hit by the plague. Thankful for their survival, the Dukes Bogislaw V, Barnim IV and Wartislaw V founded the Augustine monastery Marientron, on the Marientron hill on the southern bank of the Trzesiecko Lake.