Updated

President Obama stepped into the Massachusetts gubernatorial race Saturday to rally for friend and political ally Deval Patrick, who is struggling to overcome the anti-incumbent mood that has swept across the country during this election season.

Speaking before a crowd of several thousand at a rally at Boston's Hynes Convention Center, Obama said Patrick's opponent is banking on the same strategy as national Republicans.

"They figured they could ride people's anger and frustration all the way to the ballot box," said Obama, dressed more casually for the weekend rally, in a sport coat but no tie.

As he has throughout this campaign season, Obama sought to frame the election as a choice between his policies, which he says are moving the country forward, and those of the GOP, who he says want to return to the policies of the past.

"The worst thing we could do is go back to a philosophy that nearly destroyed our economy," Obama said.

More On This...

Although Massachusetts is among the nation's most liberal states, the last four governors before Patrick were Republicans. Massachusetts voters have opted for GOP governors as a hedge against perceived excesses by the Democratic-run state Legislature.

A poll from Suffolk University and WHDH-TV shows Patrick with a 7-point lead over Republican challenger Charles Baker. Patrick is also being challenged by independent Timothy Cahill, whose candidacy threatens to split the anti-Patrick vote.

Obama's remarks were interrupted twice by protesters demanding more funding for HIV/AIDS. Supporters in the crowd tried to drowned out the protesters by chanting, "Yes We Can," Obama's slogan during the 2008 presidential campaign.

Obama responded directly to the protesters, saying his administration had increased AIDS funding and telling them to, "take a look at what the Republican leadership has to say about AIDS funding."

With the Nov. 2 election quickly approaching, Obama has been campaigning coast to coast, raising money for candidates and looking to energize Democratic voters whose enthusiasm has waned since the 2008 election. While the White House says it still believes Democrats will retain control of the House and Senate, a sputtering economy leaves the political climate perilous for the president's party.

Recent polls suggest Republicans may well retake the House and make major gains in the Senate.

"There is no doubt that this a difficult election. That's because we've been through an incredibly difficult time as a nation," Obama told the crowd of Democrats.

He acknowledged that the hope and energy he stirred during his 2008 presidential campaign may have faded in the face of a grinding economic crisis that has left unemployment near double-digits for much of his presidency.

"I need all of you to be clear," he told the crowd, "over the next two weeks this election is a choice and the stakes could not be higher."

He said Democrats will have to show up on election day in the same numbers they did when Democrats scored convincing victories in the 2006 and 2008. That energy is more important than ever in the face of outside groups that have spent millions of dollars on pro-GOP advertisements .

"The only way to fight it, the only way to match their millions of dollars is with millions of voices," said Obama.

It was a theme Obama has sought to drive home to friendly Democratic crowds in other key states in recent weeks as the president hopes the rallies will help produce large Democratic turnouts on Nov. 2.

During a stop Friday in Delaware, where Democratic Senate candidate Chris Coons holds a solid lead over tea party-backed Republican Christine O'Donnell, Obama said no outcomes should be taken for granted.