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:
The Château Comtal (Count’s Castle) is a medieval castle within the Cité of Carcassonne, the largest city in Europe with its city walls still intact. The Château Comtal has a strong claim to be called a 'Cathar Castle'. When the Catholic Crusader army arrived in 1209 they first attacked Raymond-Roger Trencavel's castrum at Bèziers and then moved on to his main stronghold at Carcassonne.
The castle with rectangular shape is separated from the city by a deep ditch and defended by two barbicans. There are six towers curtain walls.
The castle was restored in 1853 by the architect Eugène Viollet-le-Duc. It was added to the UNESCO list of World Heritage Sites in 1997.