In 1941 the Germans renamed the town Schwertburg to erase traces of Polish origin. Gołańcz was restored to Polish rule in 1945, albeit under Soviet occupation during the existence of the Polish People's Republic.
The town's name change in 1941 aimed to erase its Polish identity. Nonetheless, by 1945, Gołańcz was re-established as a Polish entity, albeit under Soviet influence as part of the Polish People's Republic.