Activist Alexandria Ocasio-Cortez defeated powerful House Democrat Joe Crowley in a stunning primary election upset Tuesday, a result that could shake the foundations of the established party.

The 28-year-old's decisive victory over the fourth-ranking House Democrat in New York's 14th District holds potentially huge implications for the future of the party. Crowley, who has served in Congress for nearly two decades, had possible ambitions to run for House speaker if Democrats were to take a House majority in November's midterm elections and Minority Leader Nancy Pelosi's bid failed.

“We beat a machine with a movement, and that is what we have done today,” Ocasio-Cortez told supporters Tuesday night. “Working-class Americans want a clear champion and there is nothing radical about moral clarity in 2018.”

In another race seen as defining the Democratic Party's path in 2018, primary voters emphatically backed a young woman who cast herself as a progressive on economic and social issues. Ocasio-Cortez, a community organizer and education advocate, is endorsed by the Democratic Socialists of America and ran to Crowley's left. With some votes still to be counted, Ocasio-Cortez led Crowley by about 15 percentage points.

She ran without corporate donors. Crowley's campaign spent spent about 16 times more than his challenger's did. The incumbent had about 10 times more money on hand than Ocasio-Cortez did as of early June.

Ocasio-Cortez promoted proposals such as Medicare for all, a jobs guarantee and abolishing Immigration and Customs Enforcement. Ocasio-Cortez argued that Crowley — a 56-year-old white man — could not properly connect with the diverse district.

She has earned support from the wing of the political left embodied by Sen. Bernie Sanders, the independent from Vermont. In a tweeted statement, the senator congratulated Ocasio-Cortez on an "extraordinary upset victory."

"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," he said.

Bernie tweet: 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

The 14th District sits mostly in Queens and part of the Bronx, where Ocasio-Cortez was born. Crowley heads the Queens County Democratic Party. He had not faced a primary challenger in 14 years.

"I want to congratulate Ms. Ocasio-Cortez on her victory tonight. I look forward to supporting her and all Democrats this November," Crowley said in a statement Tuesday night. "The Trump administration is a threat to everything we stand for her in Queens and the Bronx, and if we don't win back the House this November, we will lose the nation we love."

Ocasio-Cortez is expected to win the blue district easily in November. She will face Republican Anthony Pappas, who ran unopposed Tuesday.

Crowley's loss raises new questions about who could challenge Pelosi for leadership following November's midterms. He is the only one of the top four House Democrats younger than 77-years-old.

In a statement, Pelosi congratulated Ocasio-Cortez on her victory. The California Democrat said Crowley brought "principled, unifying and forward-looking leadership to the historic challenges of the Trump administration."

President Donald Trump, for his part, cheered Crowley's loss. In a tweet Tuesday night, he called Crowley a "Big Trump Hater" and suggested the representative would have done better if he had supported the president more often.

"Perhaps he should have been nicer, and more respectful, to his President!" Trump wrote.

Trump tweet: 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!

Of course, nothing at all indicates Crowley lost the primary in a deep blue district because he criticized Trump. Ocasio-Cortez's proposals to abolish ICE and ensure Medicare for all certainly do not align with the president, who has cracked down on illegal border crossings and railed against too much federal government involvement in health care.

The president also claimed that "the Democrats are in Turmoil!"