BOSTON -- When Massachusetts Democrats and Republicans went to the polls Tuesday to choose John F. Kerry’s successor in the U.S. Senate, they selected a seasoned Bay State Democrat to face off against a young, fresh-faced Republican with no political experience.

Sound familiar? It should.

Rep. Edward J. Markey (D-Mass.), right, in a recent debate with his former primary opponent, Rep. Stephen F. Lynch (D-Mass.). (Dave Roback/AP)

In 2010, GOP upstart Scott Brown faced off with Democratic attorney general, Martha Coakley in a special election to succeed the late Edward M. Kennedy. Brown trounced Coakley, delivering a high-profile rebuke of President Obama at the height of debate over health-care reform, and a stinging defeat for Massachusetts Democrats, who had held the Senate seat for generations.

This year, Democrats vow not to commit the same mistakes.

Party leaders gathered at a downtown hotel Wednesday morning to publicly anoint Rep. Edward J. Markey (D-Mass.) as their candidate. Markey, 66, the dean of the Massachusetts congressional delegation, defeated his colleague, Rep. Stephen F. Lynch (D-Mass.), Tuesday night with more than 57 percent of the vote.

Republicans selected Gabriel Gomez, 47, a private equity investor and former Navy SEAL, who joked during his victory speech Tuesday night that he was playing Little League baseball the year that Markey first went to Washington.

Markey and Gomez will face off on June 25, when Massachusetts voters will head back to the polls to elect a U.S. senator for the fourth time in three years.

During a Democratic "Unity Breakfast" Wednesday morning (at which no food was served), Markey and Lynch made clear they're working together.

"We are committed to ensuring that the Republicans do not win this seat in Massachusetts in the same way that they did in 2010," Markey said, referring to Brown's victory. "We are going to stand shoulder-to-shoulder as a united party, working from this morning all the way through to June 25th to ensure that every door is rung, every phone call is made that people understand the differences between our two parties."

Lynch, who mounted a primary campaign despite objections from national Democrats, thanked Markey, Gov. Deval Patrick (D) and state party leaders for permitting him to run regardless.

"When people were trying to shut me down at the beginning of the race, saying don't get into the race, we want to clear the field for one candidate, even Ed Markey said no, primaries are good things, we should have that contest of ideas," Lynch said.

After the event, questions focused primarily on the generational contrasts between Markey and his upstart opponent.

When legendary Boston WBZ-TV political reporter Jon Keller bluntly asked how Markey represents change, the congressman immediately launched into a familiar Democratic response:

"I believe in a woman’s right to choose. I believe in the banning of assault weapons. I believe that we have to protect Social Security and Medicare," he said.

Turning to the actual question, Markey added: "I believe that it would be wrong to roll back the clock the way the Republican Party wants to roll back the clock to a day before we had Social Security, before we had Medicare." He added later, "The future of American politics should be one where there is complete transparency, where the American people and the voters of Massachusetts can know who is supporting the candidates who are running for office."

Transparency and openness are expected to be central themes of Markey's campaign. He is already attacking Gomez for declining to take the "people's pledge," a vow that Brown and now-Sen. Elizabeth Warren (D-Mass.) took during their 2012 campaigns to reject financial support from outside groups.

"I’m going to challenge Gabriel Gomez every single day to take this pledge. And I’m not going to stop until the people of Massachusetts force him to take this pledge," Markey said.

But Markey didn't rule out abandoning his own pledge if Gomez accepts outside support: "I believe that in order to do this correctly, you need to two people to take the 'people’s pledge.' And I’m challenging him to take the pledge."

Follow Ed O'Keefe on Twitter: @edatpost