“If there is going to be class warfare in this country, it’s about time the working class won that war.”

Those were Bernie Sanders’s words on the campaign trail last August as he set out to try to win the presidency. If you said in 2015 that this kind of politics would twice win millions of votes in a national election in America, no one would have believed you.

Before Bernie Sanders socialism in America was not just on the margins, it had been almost wiped out. The left-wing radicalism of the early twentieth century — from trade union militancy and the rise of the IWW to Eugene Debs’s campaigns, Woody Guthrie, Paul Robeson, and the Popular Front during the Second World War — was comprehensively routed from American life by Joseph McCarthy’s purges in the 1940s and ’50s. By the time the Civil Rights Movement came around, socialists like Bayard Rustin, and even Martin Luther King Jr himself, were forced to hide their colors.

Bernie Sanders made it possible to say you were a Red again in America. From the beginning of his first presidential campaign in 2015, he proudly wore the label “democratic socialist,” talked openly about capitalism and dispensed with liberal platitudes about the middle classes to refer straightforwardly to workers as the constituency for his campaign. In the coming days and weeks there will be plenty of attempts to say this was the reason he lost, that he should have moderated or used more comfortable terminology. But the truth is, this determination to break with decades of political orthodoxy in America made Bernie Sanders a historic figure whose name will be remembered long after this campaign is over.

Although this is often overlooked, Bernie Sanders was always one of us. Many of the young activists who were politicized alongside him in the tumults of the 1960s fell into mainstream liberalism. Bernie didn’t. He joined the Young People’s Socialist League, the youth wing of the successor to Eugene Debs’s Socialist Party, and involved himself in anticapitalist struggles. He had grown up in a Brooklyn which still had connections to a more radical past, particularly for the sons of Jewish immigrants; to a time when Yiddish soapboxers stirred revolt on street corners and socialist Jews like Meyer London were elected to Congress. As late as the 1930s, the American Labor Party, backed by Jewish garment workers, enjoyed considerable political power in the city.

But it was in Vermont where Bernie Sanders was really to make socialist politics his own. In the early 1970s, he joined the socialist-leaning Liberty Union and gradually became a statewide political figure. The party’s program was not warmed-over liberalism. It stood for a 100 percent tax on the wealthiest in America. “I favor the public ownership of utilities, banks and major industries,” he told the Burlington Free Press while campaigning in a gubernatorial election in 1976 — remarks for which he was attacked during this presidential campaign, but which he never disowned.

Although Bernie Sanders left the Liberty Union to pursue an independent path that would ultimately lead him to becoming mayor of Burlington, he never abandoned his socialist politics. In 1979 he made a documentary about the life of Eugene Debs, the last socialist to win mass popular appeal in a presidential election. In the 1980s, as well as becoming an extremely popular mayor, Sanders donated considerable time to opposing Reagan’s illegal Contra war in Nicaragua, the US-backed death squads in El Salvador, and genocide in Guatemala.

Once again, he was attacked over this during the recent presidential campaigns. And again, he refused to budge, telling the New York Times:

I did my best to stop American foreign policy, which for years was overthrowing governments in Latin America and installing puppet regimes.

Bernie Sanders was not, in other words, a figure of mainstream American politics who was radicalized or pushed left by circumstances. He didn’t spend his earlier years, as Elizabeth Warren did, as a young Republican. He didn’t come from a wealthy liberal dynasty like Franklin Delano Roosevelt. Nor did he simply adopt a folksy populist discourse out of electoral calculation like John Edwards in 2008.

Bernie Sanders has been a lifelong rebel against capitalism — someone who spent decades engaged in the painstaking work of building a political career that would both improve the lives of working people and pose a threat to a system that exploited them. In his presidential campaigns, he could have chosen an easier road to the presidency, one which didn’t raise fundamental systemic questions or champion working-class America against the corporate millionaire machine which runs the Democratic Party. Instead, he chose to open a space for socialism.

His critics will say that Bernie Sanders was beaten twice in Democratic primaries. That much is true. After more than a generation in which labor was defeated and the Left was cast to the margins, Bernie Sanders was unable to build a movement that could defeat the most powerful ruling class in the world. But he came close. After the Nevada primary, he briefly looked like he might win the nomination — until the combined political, business, and media forces of the liberal elite slammed the door shut.

What the politicos will never understand about Bernie Sanders is that, throughout his career, he has seen politics as something more than the prizefight. He understood that real political power came through organizing working-class people and building a movement. That’s why he has spent the past five years building not just a campaign, but a political revolution. And that revolution has many legacies — from the election of figures like Alexandria Ocasio-Cortez, Ilhan Omar, and Rashida Tlaib to the growth of the Democratic Socialists of America into the largest socialist organization in the United States since the 1930s; and from the widespread adoption of $15 minimum wage laws and the growth of Medicare for All and Green New Deal movements to the emboldening of left-wing unions like the National Nurses United and the American Postal Workers Union.

But the most important legacy of Bernie Sanders’s political revolution has been making socialism a force in American politics once again. Most young Bernie supporters would have to go back to the days of the great-grandparents for the last time someone could say that. It is a truly extraordinary achievement. Now, a majority of young people in America — America! — prefer socialism to capitalism. Thank you, Bernie Sanders. For everything.