ROXBURY CROSSING, MASS. -- President Obama joined a parade of top Democrats rallying support for the Senate campaign of Rep. Ed Markey of Massachusetts, who’s in a surprisingly tough contest to win the seat vacated by Secretary of State John Kerry.

Frightened of a repeat of what happened in 2010 in the race to replace the late Sen. Edward Kennedy – when Republican Scott Brown won an unexpected victory over Democratic state attorney general Martha Coakley – Democrats are taking no chances this time.

Obama campaigned in the Boston area for Markey on Wednesday, following a Tuesday fundraiser in Washington with appearances by Vice President Biden and former vice president Al Gore. President Bill Clinton is reportedly coming to Boston, too.

A new poll this week by Suffolk University showed Markey, who has represented his  House district for more than 35 years, with a narrowing lead over Gabriel Gomez, a former private equity investor and Navy SEAL who is promoting himself as the new face of the Republican Party. Markey led Gomez 48 percent to 41 percent, within the poll’s margin of error, and down from his edge of 52 percent to 40 percent last week. Special elections are notoriously difficult to poll, but Biden was forthright about the challenges facing the Markey campaign in his remarks Tuesday.

“Barack Obama’s not at the head of the ticket. And that means those legions of African Americans and Latinos are not automatically going to come out,” Biden said at the fundraiser. “No one has energized them like Barack Obama. But he’s not on the ticket. So don’t take this one for granted.”

On Wednesday, Obama told an enthusiastic crowd of supporters that he needs Markey to help mount a defense against Republicans who are refusing to compromise in Congress. “The fact of the matter is that a whole bunch of Republicans out there are not interested in getting things done. They think compromise is a dirty word,” Obama said. “We've got to have some Democrats, like Ed Markey, who will stand up and do the right thing. That's what we need.”

Obama said that Markey would fit the pattern of Democratic senators from Massachusetts like Ted Kennedy, Kerry and the newly elected Elizabeth Warren.

“The history of senators from Massachusetts is they fight for people. They fight for working people. They fight for working families. They fight for future generations. They're not scared of the special interests,” Obama said. “They know who sent them there, and they're willing to fight for them every single day. And nobody is better suited to continue that legacy than Ed Markey because Ed's one of you.”

Brad Dayspring, communications director for the National Republican Senatorial Committee, said the legions of high-profile Democrats working on Markey's behalf show the growing desperation of his campaign.

“I think one of the interesting ways to gauge a campaign is the actions of your opponent. Over the last 10 days Democrats have shown their concern about the race," he said. "They wouldn’t be sending the money and big names if they weren’t very concerned."