Senator Edward J. Markey turned back a primary challenge Tuesday from Representative Joseph P. Kennedy III, handing the Kennedy family its first-ever electoral loss in Massachusetts and demonstrating the growing strength of the progressive left.
Mr. Markey was winning by about 10 points when Mr. Kennedy telephoned to concede the race late in the evening, according to a Kennedy campaign official.
The incumbent was able to forge a coalition of younger and more liberal Democrats, the sort of voters who once formed the core of the Kennedy base.
By winning renomination in a generational clash — and the marquee Democratic Senate primary of the year — Mr. Markey, 74, proved that the ascendant left is not eager to simply throw out long-serving incumbents in favor of younger rivals, such as the 39-year-old Mr. Kennedy. Mr. Markey, who was first elected to Congress in 1976, was able to outflank Mr. Kennedy with progressives, leaving the heir of Massachusetts’s most storied political dynasty little opening.
The mail and TV blitz that Mr. Kennedy deployed in recent weeks that depicted his grandfather, Robert F. Kennedy, and great-uncles did little to affect the outcome.
In the other most closely watched race of the night, though, the left fell short. Representative Richard E. Neal, the chairman of the Ways and Means Committee and dean of Massachusetts’s House delegation, fended off Alex Morse, a liberal who is the mayor of Holyoke.
Mr. Neal, who enjoyed a sizable financial advantage, held up his clout in Washington and benefited from the relative scarcity of upscale liberals in his Western Massachusetts district. Every progressive primary challenger who has unseated a House Democrat in the last two elections has done so in and around big cities.
In the Boston area, the long-serving Representative Stephen Lynch was running well ahead of Robbie Goldstein, a physician. A number of Democrats were vying to succeed Mr. Kennedy in his liberal House district, where winning the party’s primary is tantamount to claiming the seat.
But it was the Senate primary and the challenge of Mr. Neal that demonstrated the progressive energy that’s reshaping the Democratic Party — and offered a preview of the pressure party leaders could face from the left next year if Democrats win the presidency and both chambers of Congress this fall.
Three long-serving House Democrats this year have already been unseated by a liberal challenger: Representatives William Lacy Clay of Missouri, Daniel Lipinski of Illinois and Eliot Engel of New York. The groundwork for those races was laid in part by the 2018 success of Representatives Alexandria Ocasio-Cortez of New York and Ayanna Pressley of Massachusetts, who both defeated incumbent Democrats in primaries.
Now, a number of House lawmakers are bracing for demands that they push through an ambitious agenda in a Democratic-controlled Washington or face another wave of primaries. Some of them may retire or, should Joseph R. Biden Jr. win the presidency, accept administration posts rather than seek re-election.
Yet others will surely seek to mimic Mr. Markey, who has moved to channel the new activism on the left. First elected to the House in 1976, he has been a fairly reliable liberal vote in the House and the Senate, where he moved in 2013 after John F. Kerry became secretary of state.
Mr. Markey was never known as a progressive warrior and he has cast a handful of votes — including for the 1990s crime bill and the Iraq war — that are out of step with today’s movement left.
He has taken a leadership role on issues related to the environment and technology, however, and that linked him to perhaps his most important supporter: Ms. Ocasio-Cortez. Their joint authorship of the Green New Deal offered Mr. Markey access not only to her endorsement but also entree to a new generation of environmental activists. He captured the early support of the Sunrise Movement and built a strong coalition among young progressives.
“If we’re going to have a planet for people in my generation to live on, we need someone like Senator Markey,” said Lindsay Aldworth, 29, who was active with the Sunrise Movement in college and attended a rally for Mr. Markey in New Bedford, Mass., last week.
That enthusiasm frustrated Mr. Kennedy, who was counting on winning votes from young voters. He believes that the state’s many white liberal voters did not hold Mr. Markey to account for some of his previous stances, including his long-ago opposition to the integration of Boston’s public schools, as they did Mr. Biden.
Mr. Kennedy, however, had built his own coalition of support, winning endorsements from a number of voters of color and working-class people across racial lines.
“They’re not on Twitter,” he said in an interview Saturday, acknowledging that the “question is do they vote.”
While some younger and more liberal Massachusetts voters are not enthused about perpetuating the state’s most famous political dynasty, the Kennedy name still carries significant punch among older and many Black Democrats.
“The Kennedy family is loved around here, they’re champions for labor,” said Robert Sheehan, the president of a politically powerful chapter of the International Brotherhood of Electrical Workers in Boston, which endorsed the congressman.
For much of the race, Mr. Kennedy shied away from running on his family name. It was not until Mr. Markey released a video in which he repurposed perhaps John F. Kennedy’s most famous line — “With all due respect it’s time to start asking what your country can do for you” — that his younger rival gave a speech and began advertising invoking his legacy.
Mr. Markey, though, enjoyed a considerable financial advantage at the end of the race. He outspent Mr. Kennedy nearly 4-to-1 on advertising in the Boston market in the final week of the campaign.