Media playback is unsupported on your device Media caption Alexandria Ocasio-Cortez celebrates her win with supporters

A millennial candidate has shaken up the US Democratic Party by defeating the incumbent congressman for his seat.

Alexandria Ocasio-Cortez, 28, defeated political veteran Joe Crowley, 56, on Tuesday night in their party's congressional primary in New York City.

Mr Crowley, a 10-term Democrat, had been tipped as a future party leader or even Speaker of the House.

Ms Ocasio-Cortez, a former Bernie Sanders volunteer from a Puerto Rican family, won with 57.5% of the vote.

Mr Crowley had not faced a challenger from his own party in 14 years in the mostly ethnic minority district, which covers parts of the Bronx and Queens.

Ms Ocasio-Cortez will now face Republican candidate Anthony Pappas in the November mid-terms.

If she wins, she will become the youngest ever woman elected to Congress.

She led a progressive campaign, supporting universal healthcare, tuition-free college and criminal justice reform.

Following Ms Ocasio-Cortez's win, Merriam-Webster tweeted that socialism emerged as their top search item.

Media playback is unsupported on your device Media caption The "Pink Wave": How women are shaping the 2018 US elections

The political novice, who describes herself as a socialist Democrat, had huge grassroots support. She raised more small-dollar donations than any other New York City congressional candidate.

In fact she found little support from established Democrats.

Senator Kirsten Gillibrand, a top Democrat who has a political action committee designed to support women candidates, endorsed her opponent Mr Crowley.

Ms Ocasio-Cortez posted on Twitter after Ms Gillibrand's endorsement that the New York senator "didn't even bother to talk to nor consider me before endorsing".

Warning shots fired

Analysis by Anthony Zurcher, BBC News

The progressive left just fired a warning shot across the bow of the Democratic Party establishment.

Congressman Joe Crowley was seen as a potential future speaker of the House of Representatives.

Now he is taking a forced exit from politics, paying tribute to the young activist who defeated him with a rendition of Bruce Springsteen's Born to Run after conceding defeat.

Up until now, it seemed like Democratic incumbents had been insulated from the anger and energy that has coursed through the political left during the Trump presidency.

New candidates - many younger, many women - were running for office, but they were mostly winning open primary contests or losing to better-funded, better-known Democratic incumbents.

That may have just changed.

The rage among the liberal base - stoked by heart-rending accounts of children separated from their parents at the US-Mexico border - has led to new bursts of activism, confrontation and, perhaps, an anti-establishment fervour that could endanger seemingly safe Democratic politicians.

The party is moving to the left, with growing support for universal healthcare and free college education - issues that were at the heart of Senator Bernie Sanders' 2016 presidential campaign.

That will shape the coming mid-term congressional primaries, and prospective 2020 Democratic presidential candidates will certainly take note.

Media playback is unsupported on your device Media caption The US state about to finally elect a woman

During her campaign, she criticised Mr Crowley for his ties to Wall Street and accused him of being out of touch with his increasingly diverse constituents.

They thanked each other after the result, with Mr Crowley saying he would support Ms Ocasio-Cortez in the mid-terms.

At his concession speech, Mr Crowley played guitar, dedicating the song Born to Run by Bruce Springsteen to Ms Ocasio-Cortez.

Political analysts see her 15-percentage-point victory as the biggest political upset within a party since Republican House Majority Leader Eric Cantor lost in 2014 to a little-known right-wing professor, Dave Brat.

Ms Ocasio-Cortez is now one of 130 women who have won primary elections for US House seats, 80% of who are Democrats.

There are still 341 women in the running in the House of Representatives - a record high, according to the latest data from the Center for Women and American Politics.

Who is Alexandria Ocasio-Cortez?

One of the many new female faces joining US politics this year, Ms Ocasio-Cortez is a Bronx-born Latina, a community organiser and educator from a working-class background.

The political newcomer made a viral campaign video in which she said: "Women like me aren't supposed to run for office.

"I was born in a place where your zip code determined your destiny."

She has a degree in economics and international relations from Boston University, but after graduation she worked as a waitress and bartender to supplement her mother's income as a house cleaner and bus driver, according to a profile in The Intercept.

She says she decided it was time her New York City district was represented by a young progressive woman of colour after watching the election of Donald Trump as president.

She described her congressional district in an interview with US news outlet Mic during her campaign. "Our median income is around $47,000 a year, we're about 70% people of colour," she said. "We've had the same representation for a generation."

Image copyright Getty Images Image caption Ms Ocasio-Cortez protested on the US-Mexico border against the separation of children from their parents under a Trump "zero-tolerance" policy

Take part in our coverage of the US mid-terms

Ms Ocasio-Cortez campaigned on universal healthcare, free university tuition and an end to immigration raids.

What are the issues that matter to you? And if you live outside the US, what would you like to know about the US mid-term elections?

Send us your comments or questions to AskAmerica@bbc.co.uk and we will respond to what you tell us, as part of our Ask America series.