During the Middle Ages, an Old Prussian fort called Malcekuke was located near the current site of Pieniężno. The Teutonic Knights built an Ordensburg castle near Malcekuke in 1302. Both the castle and the town which developed nearby were destroyed during the war between the Teutonic Order and the Kingdom of Poland in 1414. During the Thirteen Years' War, Mehlsack surrendered to the Order, and the castle burned down during Poland's recapture of the town. From 1589-1599, Prince Andrew Cardinal Báthory of Transylvania, cousin of Sigismund Báthory, was the administrator for the castle. In 1550, the Prussian army laid siege to the city and partially burned it down.
The town was captured by Swedish troops in 1626 during the Polish-Swedish War of 1625-29, recovered by Hetman Stanisław Rewera Potocki, and then had its castle partially destroyed by Swedish troops in 1627. The castle was restored in 1640 with Baroque gables, and its function changed from being a fortress to being a château.
During the 19th and 20th centuries the castle lost some of its Gothic and Baroque features, and in 1870 its eastern and southern wings were demolished after extensive deterioration. The remainder of the castle was used as administrative offices for Prussianofficials. From 1920-31 the western wing was renovated so the castle could be used as a school and museum. In 1945, Mehlsack, including its castle, was 90% destroyed by fighting during World War II and was conquered by the Soviet Red Army from Nazi Germany.References:
From its origin as a small stronghold built by the ancient Illyrian tribe Dalmatae, becoming a royal castle that was the seat of many Croatian kings, to its final development as a large fortress during the Ottoman wars in Europe, Klis Fortress has guarded the frontier, being lost and re-conquered several times. Due to its location on a pass that separates the mountains Mosor and Kozjak, the fortress served as a major source of defense in Dalmatia, especially against the Ottoman advance, and has been a key crossroad between the Mediterranean belt and the Balkan rear.
Since Duke Mislav of the Duchy of Croatia made Klis Fortress the seat of his throne in the middle of the 9th century, the fortress served as the seat of many Croatia"s rulers. The reign of his successor, Duke Trpimir I, the founder of the Croatian royal House of Trpimirović, is significant for spreading Christianity in the Duchy of Croatia. He largely expanded the Klis Fortress, and in Rižinice, in the valley under the fortress, he built a church and the first Benedictine monastery in Croatia. During the reign of the first Croatian king, Tomislav, Klis and Biograd na Moru were his chief residences.
In March 1242 at Klis Fortress, Tatars who were a constituent segment of the Mongol army under the leadership of Kadan suffered a major defeat while in pursuit of the Hungarian army led by King Béla IV. After their defeat by Croatian forces, the Mongols retreated, and Béla IV rewarded many Croatian towns and nobles with 'substantial riches'. During the Late Middle Ages, the fortress was governed by Croatian nobility, amongst whom Paul I Šubić of Bribir was the most significant. During his reign, the House of Šubić controlled most of modern-day Croatia and Bosnia. Excluding the brief possession by the forces of Bosnian King, Tvrtko I, the fortress remained in Hungaro-Croatian hands for the next several hundred years, until the 16th century.
Klis Fortress is probably best known for its defense against the Ottoman invasion of Europe in the early 16th century. Croatian captain Petar Kružić led the defense of the fortress against a Turkish invasion and siege that lasted for more than two and a half decades. During this defense, as Kružić and his soldiers fought without allies against the Turks, the military faction of Uskoks was formed, which later became famous as an elite Croatian militant sect. Ultimately, the defenders were defeated and the fortress was occupied by the Ottomans in 1537. After more than a century under Ottoman rule, in 1669, Klis Fortress was besieged and seized by the Republic of Venice, thus moving the border between Christian and Muslim Europe further east and helping to contribute to the decline of the Ottoman Empire. The Venetians restored and enlarged the fortress, but it was taken by the Austrians after Napoleon extinguished the republic itself in 1797. Today, Klis Fortress contains a museum where visitors to this historic military structure can see an array of arms, armor, and traditional uniforms.