With polls showing the Massachusetts governor's race in a dead heat, President Obama traveled Saturday to Boston for a rally with Gov. Deval Patrick (D).

During a speech at the Hynes Convention Center in Boston, Obama talked up Patrick as a man of “conscience and conviction.”

A recent Boston Globe poll had Patrick in a statistical tie with his Republican challenger. The survey showed Patrick getting support from 35 percent of likely voters, compared with 34 percent for Republican Charlie Baker. Treasurer Tim Cahill (I), a former Democrat, took 11 percent.

Shortly after starting his speech, protesters with signs that read “Keep The Promise” and “Fight Global AIDS” started heckling the president.

The crowd of more than 10,000 subsequently drowned them down with chants of “four more years.” But minutes later, their heckling started up again.

As Obama entered the part of his stump speech normally reserved for bashing the GOP for wanting to go back to the same economic agenda, he added a line about HIV/AIDS.

“And if they win, they will cut AIDS funding right here in the United States of America,” he said, according to the pool report. “Because we increased AIDS funding.”

He stared in the direction of the hecklers as he spoke.

Obama also encouraged supporters to reelect Patrick, despite their frustration over the economy. “I know it can be discouraging. But don’t ever let anybody tell you this guy isn’t worth it,” Obama said. “He is a man of unbending optimism with unyielding effort to move Massachusetts forward.”

Patrick didn’t reference Obama for most of the speech, mentioning only “hope was in short supply” in 2006. But toward the end Patrick said, “I believe, and our guests today believe, in the politics of conviction, not the politics of division.”

Before Obama spoke, Boston Mayor Thomas Menino, Vicki Kennedy, Rep. Ed MarkeyEdward (Ed) John MarkeyDemocrats search for 51st net neutrality vote Overnight Regulation: Dems claim 50 votes in Senate to block net neutrality repeal | Consumer bureau takes first step to revising payday lending rule | Trump wants to loosen rules on bank loans | Pentagon, FDA to speed up military drug approvals Dems say they have 50 votes in Senate to overrule net neutrality repeal MORE (D-Mass.) and Sen. John KerryJohn Forbes KerryFeehery: Oprah Dem presidential bid unlikely Dem hopefuls flock to Iowa Change in Iran will only come from its people — not the United States MORE (D-Mass.) warmed up the crowd.

Kerry criticized the slate of the Tea Party-backed candidates running for Senate.

“You got Sharron Angle out there in Nevada,” he said. “She wants to phase out Social Security. You got Joe Miller up there in Alaska. He thinks Social Security and Medicare and unemployment benefits are unconstitutional. … You’ve got Carly Fiorina saying all this talk about climate change is just a whole lot of fuss about the weather.”

He joked about how Delaware Republican Christine O’Donnell thinks she can “wave her wand and this will all disappear.”

“These people are coming at you folks,” he said.

After the event, Obama went to the West Newton home of Caritas Cristi CEO Ralph de la Torre to attend a fundraiser for the Democratic Senatorial Campaign Committee. The event, for which tickets ranged from $15,200 to $30,400, was expected to raise $900,000.

During his speech at the fundraiser, Obama lamented Republican obstructionism over the last two years. He credited the GOP for a “smart tactical decision” that made the midterms tougher from Democrats. “I don’t anticipate that getting better next year. I anticipate that getting worse," he said, according to the pool report.