NEW YORK — Alexandria Ocasio-Cortez, a 28-year-old Bernie Sanders supporter and Boston University graduate, has upset longtime US Representative Joseph Crowley in the Democratic congressional primary in New York.
‘‘We meet a machine with a movement, and that is what we have done today,’’ said Ocasio-Cortez, who has never held elected office and whose candidacy attracted only modest media attention. ‘‘Working-class Americans want a clear champion and there is nothing radical about moral clarity in 2018.’’
Crowley, a member of the Democratic House leadership, has been in Congress since 1999 and hadn’t faced an opponent in a primary election in 14 years, when the woman who beat him Tuesday 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. ‘‘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 his election night gathering, and dedicated the first song, Bruce Springsteen’s ‘‘Born to Run,’’ to Ocasio-Cortez.
Crowley represents New York’s 14th District, which includes parts of the Bronx and Queens, where he is also the leader of the Queens Democratic party.
Ocasio-Cortez ran a low-budget campaign and was outspent by an 18-1 margin but won the endorsement of some influential groups on the party’s far left, including MoveOn.
Born in the Bronx, Ocasio-Cortez said she decided to challenge Crowley to push a more progressive stance on economic and other issues.
She earned degrees in economics and international relations at BU, and also spent time working in the office of the late US Senator Edward Kennedy.
In a February interview with Mic, Ocasio-Cortez spoke of her time working for Kennedy: “I was the only Spanish speaker, and as a result, as basically a kid — a 19-, 20-year-old kid — whenever a frantic call would come into the office because someone is looking for their husband because they have been snatched off the street by ICE, I was the one that had to pick up that phone. I was the one that had to help that person navigate that system.”
She told that outlet that congressional Democrats have not done enough to fix the challenges faced by undocumented immigrants.
In an interview published earlier this week on The Cut, she said she found working for Kennedy’s office to be “incredibly fulfilling and satisfying work.”
In a statement, Sanders congratulated Ocasio-Cortez.
“She demonstrated once again what progressive grassroots politics can do,” Sanders said.
After graduating, Ocasio-Cortez returned to the Bronx where she became a community organizer. In the 2016 presidential campaign she worked for 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 US 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 and is among those considered as a possible successor to Representative Nancy Pelosi of California as Democratic leader.
During the primary campaign, he touted that experience and support for Democratic Party stances, and as a recognized name and an incumbent, was able to raise significantly more campaign funds than Ocasio-Cortez.
Crowley, who sits on the Ways and Means Committee, has been a reliable Democratic voice, voting in support of the Affordable Care Act and against attempts to repeal it, as well as voting against GOP-supported tax cuts in 2017. He has also spoken out against President Trump’s call to for a wall on the border with Mexico, and Trump’s decision to end programs that protected some immigrants from deportation.
The Republican candidate for the office, Anthony Pappas, is running unopposed and had no primary. Pappas teaches economics at St. John’s University
Danny McDonald of Globe staff contributed to this report. Material from The New York Times was used in this report.