President Barack Obama urged Massachusetts voters to cast their ballots for U.S. Senate hopeful Edward Markey.

Obama aimed to give Markey an edge over Republican Gabriel Gomez in the state's special election to replace John Kerry, who left the senate this year to become secretary of state.

At a rally in Boston's Roxbury neighborhood, Obama said "nobody is better suited to carry on" the legacy of senators from Massachusetts than Markey, a member of the U.S. House since 1976.

Obama told the thousands attending the rally that he needs Markey in the Senate to fight on issues like gun safety. Repeating a message that Vice President Joseph Biden delivered Tuesday in a fundraiser in Washington for Markey, Obama said the congressman's election to the Senate was crucial to counter Republicans who putting roadblocks to certain legislative bills.

“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, according to published reports. “We’ve got to have some Democrats, like Ed Markey, who will stand up and do the right thing. That’s what we need.”

The president said Markey would continue the tradition of Democratic senators from Massachusetts like Ted Kennedy and Kerry, among others.

“The history of senators from Massachusetts is they fight for people," Obama said. "They fight for working people. They fight for working families. They fight for future generations. They’re not scared of the special interests."

The President arrived late Wednesday morning at Logan International Airport, where he was greeted by Markey, Gov. Deval Patrick and Boston Mayor Thomas Menino. They later met with patrons and workers at a sandwich shop in the city's South End.

Gomez was also campaigning Wednesday at a technology round-table in Waltham and veterans event in Chelsea.

The President is the latest and biggest weapon the Democrats are dispatching in a lineup of political heavyweights to Massachusetts, backed by a river of outside money, to head off the possibility of an upset by Gomez, who had a strong showing in early polling.

National Republican groups have been reluctant to devote resources to a race that many Washington-based strategists have thought unwinnable for the GOP.

Few GOP stars or organizations have been willing to help Gomez, who acknowledged having donated to Obama during the 2008 election cycle.

Yet both parties know special elections draw far fewer voters — and they remember the special election in 2010 that ended with a Republican winning the Senate seat long-held by Ted Kennedy.

Meanwhile, Gomez has launched a "Latinos for Gomez" coalition which he said is supporting his proposals to provide better jobs for the Latino community and support an overhaul of the nation's immigration policies.

Gomez, the son of Colombian immigrants, has celebrated his heritage. He often speaks briefly in Spanish in his ads and on the campaign trail and is quick to point out that he learned Spanish before English at home.

The press release announcing the coalition was written in both Spanish and English.

It's unclear, however, whether Gomez' background is helping him win over Hispanic voters in Massachusetts, who are largely Democrats.

Markey has argued that he's worked on issues important to Hispanic voters during his more than three decades in Congress.

The Associated Press contributed to this story.

Follow us on twitter.com/foxnewslatino
Like us at facebook.com/foxnewslatino