1834 it has been converted into a state prison. According to this was part of Prussian repressions against Poles as the monastery was seen as particularly problematic by Prussian authorities for being a center of Polish resistance. A Jewish Synagogue was built in 1847, and a Jewish cemetery from the 19th century exists as well. During the January Uprising in 1860s in the Russian Partition of Poland, the town was the local centre of supplying medicine, food and even firearms to Polish rebels, with the Polish society in the town becoming active in war effort and led by . In 1885 a mass rally was organised by Poles, demanding among others that Polish children should be allowed to use their language in education In 1886 a bookstore with Polish books and publications was opened in the town and came into conflict with German authorities who wanted it to remove Polish language signs. In the plebiscite of 1920 3,020 inhabitants voted to remain in Weimar German East Prussia, 140 votes supported reborn Poland. In the interwar era the town was the residence of the fictional Kuba spod Wartemborka, a pseudonym of a figure in Polish press in Warmia created by which ridiculed Germanisation efforts against Poles in the region. Polish organisations continued to thrive in the town, up until Second World War; as Nazi Party was elected to power in Germany, repressions intensified, eventually many Polish activists were either imprisoned or, like Pieniężny, murdered in Nazi concentration camps and prisons. During that war, the remaining Jewish community was murdered in the Holocaust. During the war, the Germans operated a Nazi prison in the town, with several forced labour subcamps in the region, including one in the town itself. Many inhabitants fled the town since 21 January 1945, and the last German units withdrew during the night of 30–31 January. The town was occupied by Soviet troops without a fight on 31 January 1945. The Russians then plundered the town and carried out mass deportations of remaining people into the USSR, especially to Siberia. On 22 May 1945 the town, now destroyed at 60%, was handed over to Polish officials. After 173 years, the town was reintegrated with Poland,. On 9 March 1946 the prison in Barczewo has also been transferred to Polish authorities. Between 1965 and his death in 1986 it held the former Gauleiter and President of East Prussia Erich