President Obama appealed Wednesday for Massachusetts Democrats to guard against complacency in this month's Senate election, saying the party has "work to do" to ensure Rep. Edward MarkeyEd MarkeyDem senators ask Bannon for more info about Breitbart contact Dem lawmaker: FCC now stands for 'Forgetting Choice and Competition' Senate Dems want Trump to release ethics waivers, visitor logs MORE (D) defeats Republican Gabriel Gomez. [WATCH VIDEO]

In a rousing campaign speech in Boston, Obama said the June 25 election is "going to come down to turnout" and that Democrats need to cast off any post-2012 ballot box fatigue. 

"This election’s going to come down to turnout,” he said. “There are a whole lot of Democrats in this state and a whole lot of Obama voters. You can’t just turn out during a presidential election. You’ve got to turn out in this election. You can’t think, ‘Oh, I did my work in 2012.’ You’ve got some work to do in 2013.”

Obama's visit to the state comes as Markey maintains a single-digit lead in the polls over Gomez. 

Though Markey is favored to win in the deep-blue state, Democrats are taking no chances after suffering a traumatizing upset at the hands of Republican Scott Brown during the 2010 special Senate election.

The Boston Herald reported Wednesday that former President Clinton will campaign for Markey on Saturday. Vice President Biden and former Vice President Al GoreAl GoreOvernight Energy: Greens sue Trump over Keystone XL | House passes EPA science bill Overnight Tech: Trump's tech budget - Cyber gets boost; cuts for NASA climate programs | FTC faces changes under Trump | Trump to meet with Bill Gates Trump's NASA budget cuts earth, climate science programs MORE held a Washington, D.C., fundraiser for the longtime congressman on Tuesday night. 

"You can't just pat your back and say, well, I knocked on some doors back in November," Obama told the audience. "I need you knocking on some doors right now in June."

Democrats hope Obama's popularity in the state will help buoy Markey in the final weeks of the campaign. Obama won Massachusetts with a 23-point edge over Republican Mitt Romney, the state's former governor, in November.

Obama and Markey made a quick stop at a local sandwich shop, where Obama shook hands, posed for pictures and urged restaurant-goers to turn out to vote for the Democratic contender.

"I know it seems like there's an election every other week, but this one's important," he said, according to the pool report.

In his speech, Obama positionEd MarkeyEd MarkeyDem senators ask Bannon for more info about Breitbart contact Dem lawmaker: FCC now stands for 'Forgetting Choice and Competition' Senate Dems want Trump to release ethics waivers, visitor logs MORE as the next in a long line of liberal icons Massachusetts has sent to the Senate. He mentioned the late Sen. Ted Kennedy (D), Secretary of State John KerryJohn KerryEgypt’s death squads and America's deafening silence With help from US, transformative change in Iran is within reach Ellison comments on Obama criticized as 'a stupid thing to say' MORE (D), whose seat Markey is pursuing, and recently elected Sen. Elizabeth WarrenElizabeth WarrenWarren on Coulter: 'Let her speak' Balanced regulatory reform the only realistic solution to CFPB divisiveness Chris Christie gives Trump a 'B' on presidency so far MORE (D).

Markey, in his remarks, warned that electing a Republican to the Senate would "cancel out Elizabeth Warren's vote."

"I want to go to Washington to partner with Elizabeth Warren and have a strong vision and voice for Massachusetts. We did not elect Elizabeth Warren in November to cancel her vote in June," he said.

Though Obama never expressly mentioned Markey's opponent, he made it clear that another Democrat in the Senate would help him pursue his second-term agenda, mentioning gun control, climate change and defending his healthcare law as priorities.

“He’s been strong and he’s been principled and that’s the kind of leader we need right now,” Obama said of Markey.

“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 added.

The president, though, also pledged to "work with anybody," including members of the other party, on important issues.

Democrats are banking on the belief that dissatisfaction with Republican obstruction will be enough to sink Gomez.

But a recent Suffolk University poll showed Obama’s popularity in the state has declined since May. 

It also indicated that that Massachusetts voters were skeptical of Obama's response to a series of recent controversies, including the Justice Department's seizure of Associated Press reporters' phone records, questions over the handling of the Benghazi consulate attack and the targeting of conservative groups by the Internal Revenue Service that have rocked the administration.

Speaking to reporters en route to the rally, White House press secretary Jay Carney was asked whether the scandals would hurt Markey.

"The answer to the second question is no," he said.

Republicans point to Obama’s visit to the state — and a recent influx of millions from a Democratic super-PAC and the Democratic Senatorial Campaign Committee — as evidence Democrats are “showing panic” over Markey’s chances.

Carney, however, said that Obama’s visit to the state was simply an effort to help the campaign of a candidate the president supports.

"The president supports Ed Markey's candidacy, as you would expect, and believes he'll make an excellent senator.  And that's why he is traveling here to have a rally in support of Congressman Markey's campaign," he said.