The building of the Teutonic castle in Brodnica began in the fourteenth century, taking almost a whole century to complete. In 1466, the castle complex became part of the Kingdom of Poland. After a fire in 1550, the rebuilding of the castle was done so by the Starosta Rafał Działyński. During the Swedish-Polish Wars the castle began to turn into ruins. In 1785, King Frederick II of Prussia ordered do dismantle the ruins, but his orders were soon stopped by Frederick Wilhelm IV. The fate of the palace of Anna Wazówna was sealed by a fire in 1945.