US News

Bam, Rudy stump for critical Mass.

President Obama will spend some precious political capital on Massachusetts Senate hopeful Martha Coakley, stumping for the struggling Democratic candidate this weekend as Rudy Giuliani hit the Bay State yesterday to boost Republican Scott Brown.

The president’s late-game decision — the White House previously said the president didn’t plan to visit Massachusetts — came at a time when Coakley, the state’s attorney general, is locked in a surprisingly tight battle with state Sen. Brown for the seat previously held by the late Sen. Ted Kennedy in an overwhelmingly blue state.

The decision is a huge test of Obama’s political clout at a time when he can ill afford a loss.

It was a clear sign that Democrats feel the need to make a push to get her over the top in a close race, as Bill Clinton hit the trail for Coakley, and Kennedy’s widow, Vicki, showed up in an ad on the candidate’s behalf.

“We always had people in positions of authority who kept America a tomorrow country. Say yes to Martha Coakley, and don’t let anybody stay home,” Clinton said at a campaign event.

At the same time, Giuliani hit the trail for Brown, hammering home the theme of terrorism and saying that electing a Republican to a seat long held by one of the Senate’s most liberal members would send the White House a clear message about the direction of the country.

“There’s a chance to send a signal, a very, very strong signal, that we can move in the right direction. And I think that’s a way in which Massachusetts can affect the rest of the country,” said Giuliani.

The former mayor, best known for his performance in the wake of the 9/11 terror attacks, seized on comments Coakley made in a candidates’ debate this week suggesting terrorists are no longer getting safe harbor in Afghanistan and are “gone.”

“What the heck does she think we’re doing there? Why doesn’t she call General [Stanley] McChrystal? Why doesn’t she call her own president?” exclaimed Giuliani.

The crowd lapped it up.

Brown even mocked Coakley for her stump surrogates.

“She’s entitled to bring whoever she wants to bring, but I’ll tell you what. Mayor Giuliani, Bill Clinton — I’m right where I want to be,” said Brown.

While Giuliani stumped for the GOP, the Democrats made a 9/11-related gaffe, running an ad blasting Brown that contained a disturbing image of the World Trade Center. They later pulled the spot.

The dueling visits came just as a Suffolk University poll was released showing Brown ahead of Coakley by 50-46 percent, with a four-point margin of error.

That puts the race in a statistical dead heat going into Tuesday’s special election.

Brown’s late surge has stunned political onlookers and insiders who considered Coakley a probable lock on a longtime Democratic seat in a very liberal state.

The statewide poll was taken from Jan. 11-13 with a sample of 500 registered Bay State voters. While the poll wildly differs from a Boston Globe survey the weekend before, it shows the contest in a huge state of flux.

Until this weekend, Obama had simply taped a promo for Coakley in which he said she would be “my ally.”

White House press secretary Robert Gibbs shrugged off the change of heart, saying Obama “got invited.”

The taped ad from Vicki Kennedy reflects the tough position in which Democrats suddenly find themselves, since Coakley had suggested last week that she thought the senator’s widow would be too tied up to do a spot before the special election.

The Democrats need to retain the seat in order to hold on to their 60-vote, filibuster-proof majority — at a time when the president needs every Democratic vote in order to pass his health-care bill.

“If Scott Brown wins, it’ll kill the health bill,” said Rep. Barney Frank (D-Mass.).

Meanwhile, some confusion over the famous name of a third-party candidate could alter the close race. Democrats fear that candidate Joe Kennedy of the “Tea Party” could get votes from people who mistakenly think he’s related to Ted Kennedy.

maggie.haberman@nypost.com