Sen. Bernie Sanders (I-Vt.) won the New Hampshire primary on Tuesday, days after shrugging off concerns from other candidates at the Democratic debates that his self-described democratic socialism would be disastrous in the general election.

During President Trump’s State of the Union address earlier this month, he said “socialism destroys nations” and vowed to stop the lawmakers who want to “impose a socialist takeover of our health care system” — i.e. have endorsed Sanders’s Medicare-for-all plan.

But if it seems that the rise of socialist politicians such as Sanders and Rep. Alexandria Ocasio-Cortez (D-N.Y.) is something new to American politics, well, it isn’t. The “Pledge of Allegiance” was written by a Christian socialist in 1892. Eugene V. Debs ran for president on a socialist ticket five times; in 1912, he got nearly a million votes.

In fact, dozens of socialists were elected to local offices across the country between 1910 and 1912. In Milwaukee, long a hub for socialist German immigrants, socialist mayors governed for decades.

Around the turn of the century, the country was rapidly moving from being agrarian to becoming industrialized, and interest in social movements such as women’s suffrage, temperance and civil rights began to take root.

Plus, “you saw the rise of the popular media then,” said John Nichols, the author of the book “The ‘S’ Word: A Short History of an American Tradition … Socialism.” “And there was a really vibrant and active socialist press.”

Many newspapers were exposing corruption among local Democratic and Republican leaders. So for a few years, these elements coalesced into big wins for Socialist Party of America candidates, in races from city councils to the House of Representatives. And voters elected dozens of socialist mayors, from Butte, Mont., to Schenectady, N.Y.

Milwaukee was the first major city to jump on the socialist bandwagon, electing Emil Seidel in a landslide in 1910. He booted corrupt officials, opened city parks and replaced brothels with municipal recreation centers. His tenure was so successful, a former Democratic governor told The Washington Post, “He’s got some ideas that are worth thinking about all over the land.”

Then the United States joined World War I. The federal government passed strict rules against speaking out against the war, and antiwar socialist politicians were jailed, voted out of office or impeached. Seidel lost reelection when Democrats and Republicans united around one candidate. Soon, he was Debs’s running mate on the national campaign trail.

The second socialist mayor of Milwaukee, Daniel Hoan, had a much longer tenure — 1916 to 1940.

“There was a lot of pollution and, frankly, a lot of overcrowding. So Milwaukee had quite a few public health challenges,” Nichols said. “[Hoan] made public health central to pretty much everything he did. And public health is rooted in clean water, right? So as a result, they focused a lot on sewer systems and water systems.”

Though we don’t think about it much now, a good sewer is a matter of life and death. The change in Milwaukee was dramatic. The city went on to win a national health prize so many times that, according to local historian and columnist John Gurda, “Milwaukee had to be retired from the competition to give other municipalities a chance.”

Hoan governed cleanly, too, Nichols said — the police department got high marks for honesty, and Time Magazine called Milwaukee “perhaps the best governed city in the U.S.”

During the Great Depression, Hoan pioneered public housing and bulk food purchases to feed the hungry.

“Down at Washington, the only way they could think of giving relief was to give the railroads, the banks and the insurance companies money,” Hoan railed, using language reminiscent of Sanders today. “People are entitled to eat, and families are entitled to a roof over their heads.”

Even with those services, Milwaukee became the only major city in the country to be debt-free.

“I’m not a socialist and never have been,” Gurda wrote in 2009, “but I can testify that Socialism — with a capital ‘S’— was one of the best things that ever happened to this city.”

Hoan and his allies were so proud of the sewers that at national socialist conventions they earned the teasing moniker “sewer socialists.” Whereas other socialists might be obsessed with ideology, theory and revolution, the Milwaukee socialists “got really excited about the delivery of services,” Nichols said.

Even as “Socialist” faded from ballots nationally, the sewer socialists inspired people like Harry Hopkins, one of the architects of the New Deal, who went on to head the Works Progress Administration.

Frank Zeidler was the last of Milwaukee’s socialist mayors, serving from 1948 to 1960. He doubled the footprint of the city, opened parks and took a stand supporting civil rights for the city’s growing African American population. Because of this, opponents spread rumors that he put up billboards in the South telling black people to move there. After three terms, the smear campaign affected his health, and he retired.

Two decades later, in a smaller city in Vermont, the socialist mayor tradition continued with one Bernie Sanders.

Even with Sanders’s win in New Hampshire, it’s a long road yet to the nomination. But interestingly, the Democratic National Convention this year will be in Milwaukee.

Read more Retropolis: