Joe Crowley didn’t see it coming. No one did, really.

In the biggest upset of the 2018 elections so far, the chair of the House Democratic caucus lost his primary race on Tuesday to Alexandria Ocasio-Cortez, a 28-year-old activist who rode an insurgent campaign to an unlikely victory.

The Associated Press called the race Tuesday night with the Bronx-born Ocasio-Cortez, a member of the Democratic Socialists of America, leading 58-42, with 88% of the precincts reporting.

The upset was a stunning blow for Crowley, a 10-term congressman and New York political machine boss who was viewed as a possible successor to Democratic Leader Nancy Pelosi.

Rep. Joseph Crowley and House Minority Leader Nancy Pelosi following a meeting of the House Democratic caucus at the U.S. Capitol in Washington, D.C., on Jan. 31, 2018. Chip Somodevilla—Getty Images

But it was also a clear marker of the energy on the far left at the moment. A record number of women are running for office this year. And the slate of candidates on the ballot is also far more diverse than typical.

All three trends converged in New York’s 14th District, which encompasses parts of the Eastern Bronx and Northern Queens, where the majority of voters are from minority backgrounds. The Woodside-born Irish-American Crowley had remained popular in the district, where 54% of residents are Latino, 26% are African American and 5% are of Asian descent.

But Ocasio-Cortez struck a nerve in the race in part by rejecting the city’s old political machinery. “Women like me aren’t supposed to run for office,” she said in one video that was shared widely on social networks.

Ocasio-Cortez was the first primary challenger Crowley has faced in 14 years. The former aide to Sen. Ted Kennedy played up her working-class roots — her mother is Puerto Rican and her dad is a South Bronx native — as well as liberal policy positions such as federal jobs and housing guarantees and the end of private prisons.

She also keenly saw the debate about President Trump’s border policy as a way to energize voters in a primary that had remarkably low turnout. Rather than spending the last weekend of the primary in New York, she went to a child-detention center in Texas. All the while, she demanded that Congress abolish Immigration and Customs Enforcement (ICE) — a far-left position that set her apart from Crowley.

Crowley, an ambitious but loyal lieutenant to Pelosi, was widely seen as a likely heir to the Democrats’ top job. At 56, he is decades younger than the rest of Pelosi’s inner circle, a close clubhouse he for years sought to join but struggled to penetrate. He has spent much of the last few years building up chits to cash in for an election race, often visiting colleagues’ districts to help them build buzz and raise money.

But cash alone couldn’t save Crowley. He out-raised Ocasio-Cortez by a staggering 10-to-1 margin but made some stumbles in his campaign, including skipping a debate in the Bronx. “When asking New Yorkers for their vote, most candidates would begin by showing up,” The New York Times sniped in a critical editorial.

Even as late as Tuesday afternoon, senior members of the Democratic Party dismissed suggestions that Crowley was in trouble. One strategist, when asked about the need for this very article, said people suggesting a Ocasio-Cortez upset were delusional.

If elected, Ocasio-Cortez would perhaps be the youngest member of the House, a new celebrity on the Democratic left and a major force for a movement known as The Resistance. If she leverages her clout, she could perhaps drive an agenda closely aligned with the wing of the party that backed Sen. Bernie Sanders’ presidential bid in 2016. It is clearly a moment for celebration among progressives, given the district is unlikely to elect a Republican, and a draw for Democratic fundraisers.

Some saw in the upset clear echoes of 2014’s Republican primary in Richmond, Virginia. There, a little-known college professor named Dave Brat challenged House Majority Leader Eric Cantor, who at the time was considered the inevitable successor to then House Speaker John Boehner. Despite a huge fundraising deficit, Brat toppled the No. 2 Republican in the House — the first time anyone had unseated by primary someone in that role in history.

Brat carried tea party power in his race, and some today on the left suggest Ocasio-Cortez’s win portends a similar shift in the Democratic Party. That may be true. But despite the energy coursing through the party’s progressive wing, there are reasons for Democrats to worry. The party needs to expand beyond costal cities. Look at a map of congressional districts today and you’d be hard-pressed to find meaningful pockets of blue in the heartland. The Democrats may have found a new rising star on Tuesday night, but adding a socialist to the Democratic caucus is unlikely to help the Midwestern Democrats’ efforts to pick off the 23 seats the party needs to capture the majority this fall.

Get our Politics Newsletter. The headlines out of Washington never seem to slow. Subscribe to The D.C. Brief to make sense of what matters most. Please enter a valid email address. Sign Up Now Check the box if you do not wish to receive promotional offers via email from TIME. You can unsubscribe at any time. By signing up you are agreeing to our Terms of Use and Privacy Policy . This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply. Thank you! For your security, we've sent a confirmation email to the address you entered. Click the link to confirm your subscription and begin receiving our newsletters. If you don't get the confirmation within 10 minutes, please check your spam folder.

Write to Philip Elliott at philip.elliott@time.com.