In a shocking upset, U.S. Rep. Joseph Crowley has been defeated by a 28-year-old Bernie Sanders supporter in a Democratic congressional primary in New York.

Crowley, the Queens Democratic party boss who has spent two decades in Congress, was thought to have an inside track to become the next House speaker if Democrats win the majority.

He was defeated Tuesday by Alexandria Ocasio-Cortez, a member of the Democratic Socialists of America who has never held elected office.

Meanwhile, another prominent Sanders ally, former NAACP head Ben Jealous, won a crowded Democratic gubernatorial primary in Maryland. And a second insurgent in New York came within a few percentage points of ousting Rep. Yvette Clark, D-N.Y., who days ago said she was "laughing" at the challenge.

That made Tuesday a banner night for the party's progressive wing, which has had limited success in previous primaries this year.

Jealous campaigned on legalizing marijuana and establishing a single-payer healthcare system in the state. He will face a tough battle in November against Gov. Larry Hogan, a Republican who is nonetheless extremely popular in the blue state.

Ocasio-Cortez ran a low-budget campaign and was outspent by an 18-1 margin. She argued that Crowley had lost touch with his diverse district, both ideologically and demographically, and by spending too much time in Washington.

"This race is about people versus money. We've got people, they've got money. It's time we acknowledge that not all Democrats are the same," she said in a biographic video released by her campaign.

Crowley quickly conceded the race and vowed to support Ocasio-Cortez. "We will only be able to stop Donald Trump and the Republican Congress by working together, as a united Democratic Party," he said in a statement.

President Donald Trump was quick to crow about the defeat of his political foe and fellow New Yorker.

Wow! Big Trump Hater Congressman Joe Crowley, who many expected was going to take Nancy Pelosi’s place, just LOST his primary election. In other words, he’s out! That is a big one that nobody saw happening. Perhaps he should have been nicer, and more respectful, to his President! — Donald J. Trump (@realDonaldTrump) June 27, 2018

Crowley did not seem to sense the threat or raise the alarm and to ask for help. Neither were Ocasio-Cortez's allies on the left anticipating victory, and she appeared stunned and speechless in an interview with NY1 immediately after she found out she won.

"This is the start of a movement. Thank you," Ocasio-Cortez tweeted shortly after midnight Tuesday.

House Democratic Caucus Chair Joseph Crowley, D-N.Y., seen during a news conference on Capitol Hill on Feb. 7, 2018, suffered a stunning left from a political newcomer who ran to his political left. Susan Walsh / AP file

The upset is reminiscent former Republican House Minority Leader Eric Cantor’s defeat to a Tea Party challenger in 2014, which sent reverberations through the party for years.

Ocasio-Cortez has been a community organizer in the Bronx and worked on Sanders' presidential campaign. She campaigned on progressive policies like Medicare for All and abolishing Immigrations and Customs Enforcement (ICE).

New York's 14th Congressional district, which includes parts of Queens and the Bronx in New York City, is one of the most Democratic in the country, meaning Ocasio-Cortez is all but certain to make it to Congress.

It's notoriously difficult to vote in New York primaries — it's the only state in the country that holds its congressional and gubernatorial primaries on different days — which critics say is intended to protect incumbents. But low turnout can also amplify the impact of an enthusiasm gap between candidates.

Sanders congratulated Ocasio-Cortez in a tweet on her "extraordinary upset victory tonight!" saying she "demonstrated once again what progressive grassroots politics can do."

Congratulations to @Ocasio2018 on her extraordinary upset victory tonight! She took on the entire local Democratic establishment in her district and won a very strong victory. She demonstrated once again what progressive grassroots politics can do. — Bernie Sanders (@BernieSanders) June 27, 2018

“Tonight, a star is born, and a political revolution is underway. It's starting here in New York," said Bill Lipton, the director of the progressive Working Families Party of New York. "Every political leader in America should be paying attention to what happened tonight in Queens and the Bronx."