The tenor of the first encounter between Democratic senatorial candidates Sen. Ed Markey and Rep. Joe Kennedy III was established right from the start.

Markey touted his policy initiatives on gun control, climate change and — somewhat unexpectedly — Alzheimer’s disease. Kennedy agreed with Markey on virtually everything, but asserted that more vigorous leadership was needed to stand up to President Donald Trump and Senate Republican leader Mitch McConnell.

“I have led and delivered for the people of Massachusetts,” Markey said, summing up his campaign during the closing moments of the hour-long debate, sponsored by WGBH News. Countered Kennedy: “We are at a moment of crisis for our country.” Legislating and voting the right way is “critical” but insufficient, he said, adding, “This is all about power.”

Other than the presidential campaign, few electoral contests are being watched more closely this year than the battle between Markey, the 73-year-old incumbent, and Kennedy, 39, a fourth-term congressman and a member of our most famous political family. (Note: I am unrelated.) It is a race nearly devoid of policy differences, and the winner of the Democratic primary on Sept. 1 is all but assured of election. Given that, will voters go with an experienced incumbent, or will they opt for youth and a touch of glamour?

I thought Markey had the better argument Tuesday night — and not just on experience. Despite his age, his energy was a match for Kennedy’s. Twice he brought up his co-sponsorship of the Green New Deal with Rep. Alexandria Ocasio-Cortez of New York, a young progressive star who has endorsed him. He touted successful legislation to reduce auto emissions and study gun violence. For good measure, he made sure to bring up his childhood as the son of a Malden milkman — not that citing one’s humble roots has ever had much effect when running against the patrician Kennedys.

Not everything went Markey’s way. Under questioning from moderators Jim Braude and Margery Eagan, he stumbled on his refusal to endorse the so-called People’s Pledge — a promise to keep outside money out of the race that he has supported in the past. Kennedy pounced, saying both candidates should agree to ban undisclosed “dark money.” Markey responded that he wanted to give progressive groups a chance to donate, and that their contributions would in fact be disclosed. It was hard to follow, but Markey came off as someone who was willing to shift on campaign-finance reform if he thought it would benefit him.

Kennedy also had the advantage in pressing Markey for voting “present” in 2013 on whether to authorize the use of military force after Syria unleashed chemical weapons against its own people. Again, the exchange must have been nearly unfathomable except to the few experts who may have been watching. But Markey’s insistence that he voted as he did as a way of pressing the Obama administration to provide more information came across as the sort of legislative arcana that can leave voters cold.

On the other hand, the fundamental premise of Kennedy’s case struck me as flawed. Does anyone really believe that the problem with Trump and McConnell is that the Democrats haven’t been fierce enough in holding them to account?

Markey has been overshadowed by his fellow Massachusetts senator, Elizabeth Warren. But I covered Markey as a local newspaper reporter in the 1980s, and he seems utterly unchanged from the days when he was a national leader in the fight for a freeze on the development of nuclear weapons.

Fundamentally, Markey is the same person who was first elected to Congress in 1976 on the strength of a memorable ad. As a state representative, his desk had been moved out into the corridor on orders from Massachusetts House leaders, who were angered by his demands for judicial reform. “The bosses may tell me where to sit,” Markey said, looking at the camera. “No one tells me where to stand.”

There were a few subtle differences Tuesday night.

Both candidates favor Medicare for All, but Kennedy said he foresaw a continuing role for private insurance even if such a system becomes law. (He also invoked his uncle Ted’s 1971 proposal for single-payer universal insurance.)

Both spoke about actions they would take to reverse decades of economic discrimination against African-Americans, which, they said, affects access to housing and public transportation. But only Markey brought up the idea of reparations for slavery, which he called “the original sin in our society.”

Both favored bringing U.S. troops home from Afghanistan. But Kennedy was willing to do so more quickly and with fewer conditions than Markey, who invoked the horrors that Afghan women have suffered under the Taliban.

So where do we go from here? According to a September poll conducted by The Boston Globe and Suffolk University, Markey trailed Kennedy by a margin of 42% to 28% — a wide gap that may have mainly been a reflection of the superior name recognition that any Kennedy enjoys.

With the race now heating up, Markey has a chance to reintroduce himself to voters and close that gap. The biggest challenge he faces is time. If he’s re-elected, he’ll be 80 before his next term ends. Ultimately, there’s not much he can do if voters decide to thank him for a job well done — and then move on to the next generation.

WGBH News contributor Dan Kennedy’s blog, Media Nation, is online at dankennedy.net.