The victory of socialist Alexandria Ocasio-Cortez in the Democratic Party primary in New York’s 14th Congressional District on 26 June has put the US political establishment in a spin.

It is one of the biggest political upsets in recent US history. Her opponent was Joe Crowley, a 10-term congressman and one of the most senior Democratic Party politicians in Washington. A 28-year-old restaurant worker, Ocasio-Cortez was the first person to challenge Crowley in a primary contest for 14 years.

Ocasio-Cortez won comfortably – gaining 57.5 percent of the vote to Crowley’s 42.5 percent. The district is solidly Democratic, so Ocasio-Cortez is almost certain to be voted into Congress in November.

No-one expected this result. For Ocasio-Cortez, even getting on the ballot was a win. Crowley was backed to the hilt by the powerful New York Democratic Party machine and its big business donors. According to the Center for Responsive Politics, he poured US$3.4 million into the campaign, compared to the US$300,000 that Ocasio-Cortez raised – overwhelmingly from small donations.

Just three weeks before the election, polling by the Crowley campaign put him ahead by 36 percent. He was so confident of victory that he didn’t even bother turning up to a pre-election debate.

So how did Ocasio-Cortez win? One interpretation is that it was all about demographics: specifically, that Ocasio-Cortez’s Puerto Rican background made her more relatable in an area where just under 47 percent of the population identify as Hispanic.

Typical of this is a piece by Dana Milbank in the Washington Post. According to Milbank, “Crowley lost because of the changing demographics in his district, which had been redrawn considerably after 2010 and is now only 18 percent white”.

A detailed analysis of voting patterns in the election by Steven Romalewski of the City University of New York showed this simply wasn’t the case. Ocasio-Cortez actually did better in areas of the district with a lower proportion of Hispanic voters.

While there’s no hard data on exactly who voted for which candidate, anecdotal evidence from those involved with the Ocasio-Cortez campaign suggest her win can largely be attributed to the enthusiastic support she gained from the overwhelmingly young and diverse section of the population that backed the Bernie Sanders campaign in the presidential primary in 2016.

Historically, this is a cohort that has shown little enthusiasm for voting. In a mid-term primary like this one, these voters might have been expected to stay at home. But Ocasio-Cortez’s “democratic socialist” pitch not only inspired thousands of previously non-voting young people to turn out for the election but also drew in an army of volunteers to help get the message out in the lead-up.

If anything, Ocasio-Cortez’s positioned herself to the left of Sanders. Like Sanders, she attacked her opponent as being in the pocket of Wall Street. She went further, however, in outlining a positive program of reform. Front and centre of her campaign were universal health care, a federal jobs guarantee, abolishing the US Immigration and Customs Enforcement Agency and a “green New Deal”. 

In the aftermath of her victory, some establishment Democrats have claimed that all this isn’t so far from what they themselves are fighting for, and that the Democrats are a broad church that can encompass a range of different political views. For those who remember how hard those Democrats fought to ensure Hillary Clinton won out over Sanders in 2016, this will be hard to swallow.

Others have dismissed Ocasio-Cortez’s brand of socialism as something that will never appeal to the mass of US voters outside ethnically diverse urban centres like New York. Ironically, these are some of the same people who argued in 2016 that, while Sanders’ focus on questions of class and inequality might appeal to white workers, it risked alienating minorities.

As these pundits see it, the only way the Democrats can hope to defeat Trump is to maintain their centrist (read: right wing) course, hoping to win over more so-called moderate Republicans. This is a difficult position to maintain. There has, perhaps, never been a more credentialed centrist candidate than Hillary Clinton, who was notably unsuccessful in beating Trump in 2016.

No doubt it’s too much to expect that the Democrats, a party that has faithfully served corporate America throughout its history, would draw the obvious conclusion: that a politics based, as Ocasio-Cortez puts it, on the proposition that “in a modern, moral and wealthy society, no person should be too poor to live”, has a wide, rapidly increasing and potentially election winning appeal in the US today.