A millennial candidate has shaken up the US Democratic Party having beaten 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 a 57.5% majority.

Mr Crowley, who had not faced a challenger from his own party in 14 years, had 42.5% in the majority 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.

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

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

During her campaign, she criticised Mr Crowley on 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.

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