Twenty-seven thousand people cast votes on Tuesday in the Democratic primary in New York’s Fourteenth Congressional District, and most of them voted for a twenty-eight-year-old left-wing political newcomer named Alexandria Ocasio-Cortez. Just nine months ago, Ocasio-Cortez had been tending bar at a Mexican restaurant near Union Square. Her incumbent opponent, the longtime congressman Joseph Crowley, has represented the area since Ocasio-Cortez was in elementary school, and was, until now, widely seen as a future contender to become House Speaker.

Last month, Crowley’s victory looked so assured that he sent a surrogate to a debate with Ocasio-Cortez rather than attend himself. Crowley had been handpicked for his seat in Congress years ago by Thomas Manton, the last great boss of the Queens Democratic machine. But the Fourteenth District—a collection of mostly working-class neighborhoods straddling Queens and the Bronx—is now half Hispanic and just a fifth white. Crowley’s loss to the daughter of working-class Puerto Ricans confirmed a change in outer-borough political power that has both been inevitable and long delayed. But it was more than that, too. During her campaign, Ocasio-Cortez called for Congress to abolish Immigration and Customs Enforcement, pledged her support for a federal jobs guarantee and Bernie Sanders’s Medicare-for-all program, called for aggressive antitrust regulation that would break up the tech giants, and ran with the endorsement of the Democratic Socialists of America. For a while this spring, the midterms looked increasingly predictable and contained: it would be a partisan fight between Donald Trump and his opponents, waged in a fixed number of swing districts. Ocasio-Cortez’s victory suggests that the map may be larger than that.

Many candidates have tried to run as progressive insurgents in the 2018 primaries, positioning themselves as inheritors of the outsider mantle that Sanders ran on in the 2016 Presidential primaries. Most have lost. (“Bernie’s army in disarray,” the headline of a recent piece in Politico said.) The Sanders movement has sometimes seemed as pedantic and single-minded as its hero, fixated on the influence of billionaires. While Ocasio-Cortez borrowed some of Sanders’s language and policy ideas—she stressed her opposition to luxury-real-estate development and refused to take corporate money; in an interview she insisted that Crowley “runs a profoundly corrupt political machine”—she also embodied a more varied conflict with power. She gave interviews to the Cut and Vogue (“Vogue is in on the revolution!” she tweeted, appending a purple heart), and travelled, last week, to the new tent camp for migrant children in Tornillo, Texas. Dressed all in white and ringed by television cameras, she spoke through a fence to a silent security guard about the “human-rights abuses” going on inside. Many progressives have experienced the Trump era as an emergency, but the terms of that emergency—the sources of the stress—are not the same for everyone. Ocasio-Cortez spoke sometimes of intersectionality. Her campaign managed to channel the full range of progressive alarm.

While Ocasio-Cortez borrowed some of Sanders’s language and policy ideas, she also embodied a more varied conflict with power. Photograph by John Trotter / MAPS Images

Against this, what could Crowley offer? As a congressman, he had been both susceptible to left-wing caricature (he raised three million dollars in campaign donations, much of it from large corporations and lobbies) and somewhat better than that. In public, he was easygoing and paternal, the holder of a safe Democratic seat, unchallenged in a primary since 2004. He took an obvious pride in having helped to diversify the leadership of the Queens Democratic Party, to somewhat better match the demographics of the borough. But what he offered voters was the status quo. His campaign Web site quoted Washington publications speculating that he was poised to move even higher in the Democratic Party’s leadership in the House, and his campaign advertisement, in which he promised to fight for more education funding and affordable health care, could—except for a couple of pointed mentions of Trump—have aired during any election in the past quarter-century. “I am a Democrat, first and foremost,” Crowley insisted. Ocasio-Cortez both is and isn’t part of the Bernie Sanders movement. But her victory proved again the central insight of Sanders’s Presidential campaign: that the Democratic establishment is as weak as the Republican one that caved so easily during the Obama years under pressure from right-wing outsiders. Crowley leaned back on his party, expecting a pillar of support. But there was nothing sturdy there.

Since the 2016 election, the Sanders movement has been tricky to pin down—at times it has seemed to embody the Democratic future and at others to be disappearing quickly into the past. The pessimistic case is simple: electorally, the movement has generally been a dud. In Ohio, Iowa, Montana, and Nebraska, Sanders-like candidates have lost, often by large margins, even in primary races during a year when the progressive grassroots are especially energized. The organization that Sanders’s staffers and allies created to recruit and fund candidates in his image, Our Revolution, has been weakened by internal scuffling, in part over its leaders’ reluctance to emphasize a progressive position on immigration. Sanders has always been stingy about alliances—earlier this year, he refused to endorse his own son’s candidacy for Congress—and so he has been only an intermittent presence in the campaigns that drew their inspiration from his. In the rolling crisis of the Trump Administration, he has been on the margins. Last month, in an early Presidential poll taken among Democrats in New Hampshire, where loyalties to Sanders are deep, and where, in 2016, he beat Hillary Clinton by twenty points, the Vermont socialist ran third, drawing only half as much support as Elizabeth Warren.

Further Reading New Yorker writers on the 2018 midterm elections.

Two Sanders allies won on Tuesday—Ocasio-Cortez and Ben Jealous, the former N.A.A.C.P. chair who is now the Democratic nominee for governor of Maryland—and in these victories there were some hints about how the left might evolve after Sanders. But the focus on electoral wins and losses has obscured another pattern, just as meaningful, in which the Wall Street Democrats whom Sanders has long pointedly denounced have moved in his direction. Andrew Cuomo, New York’s governor, who is now facing a left-wing primary challenge by the actress Cynthia Nixon, joined Sanders at a press conference, in the winter of 2017, to announce that he would be implementing a version of the socialist’s free-college program. This spring, Senator Cory Booker, of New Jersey—who once, over the loud protests of the teachers’ unions, sought to remake Newark’s schools in partnership with Mark Zuckerberg—called for a pilot program that would model a federal jobs guarantee, an idea that until very recently belonged only to the progressive fringe. Senator Kirsten Gillibrand, of New York, who as a corporate attorney helped to defend Philip Morris in the great tobacco lawsuits of the nineteen-nineties, has signed up for just about all of it: the jobs guarantee, Medicare-for-all, free college. It’s probably not a coincidence that all three of these politicians are contemplating Presidential campaigns.

On Tuesday night, Crowley ended the evening at his campaign party by playing a cover of Bruce Springsteen’s “Born to Run” on the guitar, which he dedicated to Ocasio-Cortez—he could take the temperature of the times, too. Around him, the Democratic Party is only partly changed, and so there are contradictions everywhere: in Ocasio-Cortez’s retweeting of praise from the billionaire Tom Steyer, and in the present practical problem of how a party increasingly focussed on economic redistribution will spend the eighty million dollars that the former New York City mayor Michael Bloomberg has pledged to its efforts. But Ocasio-Cortez’s victory, and her quick embrace by the Party afterward, repeated a pattern, which has been happening since the middle of the Obama years, of Democrats adopting, rather than shunning, left-wing protest movements: Occupy, Black Lives Matter, and now Sandersism. Last week, Jake Sullivan, who had been in charge of policy for Hillary Clinton’s Presidential campaign, wrote a long essay for the journal Democracy making the case for the Party to embrace a more radical idea of government, and a more expansive view of what voters would tolerate. “The bottom line is that Democrats should not blush too much, or pay too much heed, when political commentators arch their eyebrows about the party moving left,” Sullivan wrote. “The center of gravity itself is moving, and this is a good thing.” The images of Sanders on the campaign trail, puritanical and intent, are indelible. How weird would it be if his deepest effect is not to leave behind a popular movement but to convert the Party’s élites?

A previous version of this post incorrectly described Senator Booker’s bill for a federal-jobs-guarantee program.