During World War II, the Germans established the E355, E371, E476 and possibly also E574 working parties of the Stalag VIII-B/344 prisoner-of-war camp in the town. In the final stages of the war, the populace was evacuated in January 1945. Retreating Germans blew up bridges behind them, and finally left the town in May 1945. After the war the remaining German population was expelled and with the implementation of the Oder-Neisse line in 1945, the area was transferred to the Republic of Poland, all in accordance to the Potsdam Agreement. The town was repopulated by Poles, many of whom were displaced from former eastern Poland annexed by the Soviet Union, as well as settlers from war-devastated central Poland, especially from the area of Myszków. The first post-war mayor of Głuchołazy was Szymon Koszyk, pre-war Polish activist, writer and publicist in Upper Silesia and participant in the Silesian Uprisings.