NEW YORK (AP) - Alexandria Ocasio-Cortez, a 28-year-old political novice running on a low budget and an unabashedly liberal platform, upset longtime U.S. Rep. Joseph Crowley on Tuesday in the Democratic congressional primary in New York.

The surprise victory by the community organizer in a district that includes parts of the Bronx and Queens came after an energetic, grassroots campaign that mustered more than enough support in a low-turnout race that many had expected to be an easy win for Crowley, a member of the Democratic House leadership.

“The community is ready for a movement of economic and social justice. That is what we tried to deliver,” said Ocasio-Cortez, who has never held elected office and whose candidacy attracted only modest media attention.

She told The Associated Press after her victory that she didn’t have enough money to do polling in the race, but felt in her gut that her message had a chance to connect.

“I live in this community. I organized in this community. I felt the absence of the incumbent. I knew he didn’t have a strong presence,” she said.

Crowley has been in Congress since 1999 and hadn’t faced an opponent in a primary election since 2004, when Ocasio-Cortez was just a teenager. He was considered a candidate to become the next House speaker if Democrats win the majority.

“It’s not about me,” Crowley, 56, told his supporters at a campaign party following his loss. “It’s about America. I want nothing but the best for Ms. Ocasio-Cortez. I want her to be victorious.”

He later played guitar with a band at the election night gathering, and dedicated the first song, Bruce Springsteen’s “Born to Run,” to Ocasio-Cortez.

Crowley represents New York’s 14th Congressional District, where he is also the leader of the Queens Democratic party.

Ocasio-Cortez was outspent by an 18-1 margin during her race but won the endorsement of some influential groups on the party’s far left, including MoveOn, as well as the actress Cynthia Nixon, who is running for governor. She defeated Crowley by 15 percentage points.

Born in the Bronx to a mother from Puerto Rico and a father who died in 2008, Ocasio-Cortez said she decided to challenge Crowley to push a more progressive stance on economic and other issues.

She attended Boston University, where she earned degrees in economics and international relations, and also spent time working in the office of the late U.S. Sen. Edward Kennedy.

After graduating, she returned to the Bronx where she became a community organizer. In the 2016 presidential campaign she worked for U.S. Sen. Bernie Sanders.

Among her issues is expanding the Medicare program to people of all ages and abolishing Immigrations and Customs Enforcement. She recently went to Tornillo, Texas, to protest against policies that have separated parents from their children at the southern U.S. border.

Ocasio-Cortez gained some internet attention for a campaign video called “The Courage to Change,” a two-minute spot for which she wrote the script and featured footage from her own home.

Crowley is chair of the House Democratic Caucus, the fourth-highest ranking position in Democratic leadership in that chamber of Congress.

His loss drew the attention of President Donald Trump.

“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!” he tweeted.

The Republican candidate for the office, Anthony Pappas, is running unopposed and had no primary. Pappas teaches economics at St. John’s University.

___

This story has been corrected to show that Ocasio-Cortez said “meet a machine,” not “beat a machine.”