In the last weeks of World War II, in March 1945, the town was conquered by joint Soviet and Polish forces during the Vistula-Oder offensive. After the war, the town was handed over to the Republic of Poland according to the 1945 Potsdam Agreement and the remaining German population was expelled, also in accordance with the Potsdam Agreement. The town was repopulated by Poles, often displaced from former eastern Poland annexed by the Soviet Union. A monument to the 972 Battle of Cedynia was erected in the town on the occasion of the millennial anniversary in 1972.