Until 1918, the town was a German-speaking island in a Slovene-speaking area. In the 1880 census, the town of Slovenj Gradec was 75 percent German-speaking and 25 percent Slovene-speaking. Many inhabitants, like the family of the composer Hugo Wolf, were of mixed ethnic origin. After the end of World War I, many of the local German-speaking inhabitants emigrated to Austria. Those who remained were gradually assimilated into the now Slovene-speaking majority. During World War Two, the town was occupied by the Nazis and annexed to the Third Reich. The local Slovenes were submitted to a policy of violent Germanization and many died of various persecutions. The partisan insurgency developed in the area, especially in the hills to the east of the town. After World War II, the remaining ethnic Germans were expelled from Yugoslavia, and Slovenj Gradec lost its traditional presence of German speakers.