In my political circles, the socialist and activist left, the recent defeat of India Walton, a democratic socialist candidate for mayor of Buffalo, seemed all too familiar, even if she lost in an unusual way to the incumbent Democratic mayor, Byron Brown. Walton prevailed against Brown in the Democratic primary, but for the general election, he ran a write-in campaign to retain his position.

That outcome saddens and disappoints me. Like many admirers of Walton, I believe she was terribly mistreated by the New York Democratic Party, which largely fell in line behind Brown, even though he was not running as a Democrat. It's not fair that Walton had to run against him twice, with the weight of a lot of centrist Democrats and Republicans behind him in the general election, and that he enjoyed the support of several prominent labor unions and much of the city's and state's larger party infrastructure. (U.S. Sens. Chuck Schumer and Kirsten Gillibrand did endorse Walton.)

Nevertheless, I am willing to say something far too few leftists seem willing to: Not only did Brown win, but he won resoundingly (the race is not officially over but stands at roughly 59% for Brown to 41% for Walton); it's time for young socialists and progressive Democrats to recognize that our beliefs just might not be popular enough to win elections consistently. It does us no favors to pretend otherwise.

What too many young socialists and progressive Democrats don't seem to realize is that it's perfectly possible that the Democratic Party is biased against our beliefs and that our beliefs simply aren't very popular.

They frequently claim that Americans want socialist policies and socialist politicians but are prevented from voting for them by the system. Or they argue that most American voters have no deeply held economic beliefs at all and are ready to be rallied to the socialist cause by a charismatic candidate.

This attitude toward Walton's defeat specifically and toward the political landscape more broadly is part and parcel of a problem that has deepened in the past five years: So many on the radical left whom I know have convinced themselves that their politics and policies are in fact quite popular on a national level, despite the mounting evidence otherwise.

As New York magazine's Sarah Jones put it over the summer, "Should Democrats mount a cohesive critique of capitalism, they'll meet many Americans where they are." We are held back, the thinking frequently goes, not by the popularity of our ideas but by the forces of reaction marshaled against us.

But the only way for the left to overcome our institutional disadvantages is to compel more voters to vote for us. Bernie Sanders's two noble failures in Democratic presidential primaries galvanized young progressives and helped create political structures that have pulled the party left. They also helped convince many of a socialist bent that only dirty tricks can defeat us. In the 2016 primary, the superdelegate system demonstrated how undemocratic the Democratic Party can be. Sanders won every county in West Virginia, for example, but the system at the time ensured that Sanders did not receive superdelegates in proportion to his vote totals (many superdelegates defied the wishes of the voters and supported Clinton). In 2020, it was widely reported that after Sanders's victory in Nevada, former President Barack Obama had an indirect role as the minor candidates in the primary rallied behind Joe Biden to defeat the socialist threat. There is little doubt that the establishment worked overtime to prevent a Sanders nomination.

But the inconvenient fact is that Sanders received far fewer primary votes than Clinton in 2016 and Biden in 2020. He failed to make major inroads among the moderate Black voters whom many see as the heart of the Democratic Party. What's more, he failed to turn out the youth vote in the way that his supporters insisted he would.

Whatever else we may want to say about the system, we cannot shut our eyes to the fact that the voters of the liberal party in American politics twice had the opportunity to nominate Sanders as their candidate for president and twice declined to do so. If we don't allow this to inform our understanding of the popularity of our politics, we'll never move forward and start winning elections to gain more power in our system.

This may be seen as a betrayal of the socialist principles I stand for, which are at heart an insistence on the absolute moral equality of every person and a fierce commitment to fighting for the worst-off with whatever social and governmental means are necessary. But I am writing this precisely because I believe so deeply in those principles. I want socialism to win, and to do that, socialists must be ruthless with ourselves.

The idea that most Americans quietly agree with our positions is dangerous, because it leads to the kind of complacency that has dogged Democrats since the "emerging Democratic majority" myth became mainstream. Socialists can take some heart in public polling that shows Americans warming to the abstract idea of socialism. But "socialism" is an abstraction that means little without a winning candidate. And too much of this energy seems to stem from the echo-chamber quality of social media, as young socialists look at the world through Twitter and TikTok and see only the smiling faces of their own beliefs reflected back at them.

Socialist victory will require taking a long, hard road to spread our message, to convince a skeptical public that socialist policies and values are good for them and the country. Which is to say, it will take decades.

Americans have lived in a capitalist system for generations; that will not be an easy obstacle for socialists to overcome. If you want socialist policies in the U.S., there is no alternative to the slow and steady work of changing minds. My fellow travelers are in the habit of saying that justice can't wait. But justice has waited for thousands of years, and we all must eventually come to terms with the fact that we don't get to simply choose when it arrives.

Fredrik deBoer is the author of "The Cult of Smart: How Our Broken Education System Perpetuates Social Injustice" and publishes a daily newsletter. This article originally appeared in the New York Times.