 After the war, according to the preliminary agreements of the conferences of Yalta and Potsdam, the German territories east of the Oder-Neisse line — most of Pomerania, Silesia and East Prussia — were transferred to Poland and from the middle of 1945 through to 1946 the surviving Germans were expelled.The city was settled by Poles, most of whom were expelled from the former Polish eastern territories annexed by the Soviet Union (around 80% at the end of 1945) and the rest were mainly repatriates from the Soviet Union and Poles returning from Germany.Also Ukrainians and Lemkos settled into the town during Operation Vistula.