Mr. Kennedy, the grandson of Robert F. Kennedy, had publicly indicated that he intended to run for re-election next year. But in a conversation this week with the Democratic official, who spoke on the condition of anonymity to discuss the private deliberations, Mr. Kennedy, 38, said that he was weighing a campaign against Mr. Markey, 73, and would decide in the coming weeks.

A contest between the two Massachusetts lawmakers could become the nation’s most high-profile primary race and would represent another test of the Democratic Party’s old guard. And while Mr. Kennedy and Mr. Markey are both committed progressives, the race would amount to a generational showdown between a scion of the state’s most famous family and a more than four-decade-long fixture of Massachusetts politics…

“Ed is not going anywhere,” Mr. Tencher said. “He’s going to run, and he’s going to run no matter who is in this race.”