Paul Morigi / Getty / The Atlantic

For the better part of a year, Senator Edward Markey was a legislator spiraling toward a forced retirement, a veteran progressive whose legacy in Massachusetts would soon be reduced to a footnote in the latest chapter of the Kennedy dynasty. Polls taken last fall showed Representative Joe Kennedy III trouncing Markey in a Democratic primary; at the height of the coronavirus pandemic this spring, it was unclear whether Markey could even muster enough signatures to get on the ballot.

Tonight, however, Markey accomplished what no Democrat or Republican had ever done: He defeated a Kennedy in Massachusetts.

Markey’s victory in the nation’s highest-profile Democratic Senate primary—which all but ensures him another six-year term—is a win for progressives across the country, who rallied around the 74-year-old incumbent as he faced a 39-year-old challenger who tried to make the contest about youthful vigor rather than ideology.

Overall, the Massachusetts primary results did not fit neatly into a larger national narrative. They represented a vindication for incumbents but a mixed bag for progressives, who succeeded in protecting Markey but failed in their bid to oust long-serving Representative Richard Neal, the chairman of the House Ways and Means Committee. Neal defeated a young progressive challenger, Holyoke Mayor Alex Morse, in his bid for a 17th term.

Yet for Markey, the night capped not merely a comeback but a remarkable political reinvention—one that turned a Democrat with a solid but unspectacular record of accomplishment into a kindred spirit of his fellow New Englander Bernie Sanders. Over nearly half a century in elected office, Markey had a reputation as a solid progressive but not a trailblazer, an effective legislator who toiled in Washington and was rarely seen back home.

That all changed several months ago.

Kennedy jumped into the race a year ago after a pair of polls showed him well ahead of Markey in a hypothetical matchup; the surveys were a testament to both the Kennedy brand in Massachusetts and the lack of one for Markey, despite his having represented the state in Congress since before Joe Kennedy was born. By a margin of 18 points, Democratic voters in a Boston Globe poll identified Kennedy as the more liberal candidate. The genius of Markey’s campaign was that it took his biggest vulnerability and used it as an opportunity: The senator didn’t have much of a political identity in Massachusetts, so his supporters created one for him.

Markey became “someone who most people in Massachusetts who follow politics would say is unrecognizable,” Mary Anne Marsh, a veteran Democratic strategist in the Bay State, told me.

The identity Markey’s camp created—that of a tenacious progressive fighter who often took lonely stands against his party—closely resembled Sanders’s. They dug up a vintage 1970s TV ad from when Markey first ran for Congress, in which he boasted that party bosses had thrown his desk out into a hallway. The linchpin of the strategy was Representative Alexandria Ocasio-Cortez, who endorsed Markey after he partnered with her to introduce the Green New Deal just weeks after she took office in 2019. Progressive groups such as the Sunrise Movement joined her in backing Markey, rewarding his leadership on climate change while forgiving his votes for the Iraq War, NAFTA, and the 1994 crime bill. (Activists on the left assailed former Vice President Joe Biden for a similar record during the Democratic presidential primary.) A three-minute video hailing Markey as the “Green New Dealmaker” and co-opting a famous Kennedy refrain became a sensation, and an ad featuring Ocasio-Cortez ran on TV in the state more than 1,200 times.

(JONATHAN ERNST / Reuters)

The pandemic worked to Markey’s advantage, too, as it negated Kennedy’s plans to barnstorm the state and put his superior retail-campaigning skills to use. By the time both candidates were able to venture out again this summer, Markey had an online army backing him and tearing into Kennedy as a quasi-centrist son of privilege. “He had an open field to redefine himself in a way that would make the old show Extreme Makeover blush,” Marsh said.

Markey’s team chafes at the suggestion—made by Marsh and former Representative Barney Frank, among others—that he reinvented himself, or that he campaigned as somebody he’s not. “With all due respect,” the senator’s campaign manager, John Walsh, told me on the eve of the primary, “I think it is one of the feeblest explanations of what happened here that I've heard.”

Walsh began, as he often does, to recite the biography of a senator whose fights—on behalf of minorities and working families, against nuclear proliferation, for the environment—often took place out of the spotlight, or in the committee rooms of Congress. In the 74 years since a young John F. Kennedy first ran for Congress, no Kennedy had lost a race in Massachusetts. But in the 47 years since he first ran for office, neither had Ed Markey. Walsh acknowledged, however, that perhaps the voters of Massachusetts were not familiar enough with their senator. “I would concede,” Walsh said, that “it was necessary to tell this story because Ed has consistently done this work but then moved on to the next project, the next issue.”

Kennedy struggled to articulate a rationale for his candidacy and could not effectively puncture Markey’s remade image as a progressive icon. And unlike Ocasio-Cortez and Ayanna Pressley in their 2018 midterm victories, Kennedy, despite his youth, could not claim to be a leader of underrepresented communities. As a white, male heir to political royalty, Kennedy posed no challenge to the dominant power structure of the Democratic Party. So younger voters, those of his own generation, flocked to the much older Markey, just as they had to Sanders.

When I wrote about the race earlier this summer, Kennedy’s advisers told me that they always thought the race would end up close and acknowledged that their candidate was relying on higher turnout from infrequent Democratic voters, which was more uncertain than ever during a pandemic. He did end up barnstorming the state as Massachusetts reopened, showing off his hustle and charisma as a contrast to Markey, whose in-person campaigning was more sporadic. But during a primary in which nearly 1 million Massachusetts voters cast their ballots early by mail, Kennedy found fewer and fewer Democrats to persuade. By this past weekend, every public poll showed him losing, a few by double digits.

When I interviewed Kennedy last month in Worcester, before the race had fully turned against him, he told me he had “no desire to commit career suicide.” But he briefly considered the possibility that he might lose. “At the very least,” he said, “even if I'm not successful, you're going to get a senator that’s going to run the race of his life and be far more connected and far more energized, and far more engaged in Massachusetts.”

At 39, Kennedy likely still has a political future, despite the embarrassment of this defeat. And he’s probably right about the ultimate impact of his primary challenge, too. Massachusetts voters aren’t getting a new senator, but in the suddenly hip, influential Ed Markey, they have a reinvigorated one for sure.

We want to hear what you think about this article. Submit a letter to the editor or write to letters@theatlantic.com.