Jan. 17, 2010  -- President Obama probably never thought he'd be in Massachusetts on Sunday night. But with Republican Scott Brown showing unexpected strength two days before the special election for Ted Kennedy's senate seat, Obama made a last-minute trip to Boston to headline a rally for Democrat Martha Coakley. A crowd of more than 1,000 at Northeastern University heard the president say, "I need you!"

Even before Obama scheduled his trip, however, campaign lawyers in both political parties had begun quietly cramming for the colossal legal battle that could ensue should Brown pull off a stunning upset in one of the nation's bluest states.

Republican lawyers fear that if Brown wins, Democrats will use stall tactics to delay certification of his victory till after the U.S. Senate casts its final vote on President Obama's healthcare bill.

That's because right now the interim senator appointed after Kennedy's death, Paul Kirk, could deliver President Obama the key 60th vote on the hotly contested health insurance reform plan.

"Both sides are going to be ready for a fight," said one election lawyer involved in the preparations, who discussed the effort on the condition he not be named.

Brian McNiff, a spokesman for Secretary of the Commonwealth William Francis Galvin, who is in charge of elections in Massachusetts, said attorneys in his office have been fielding a lot of calls from the two sides in recent days.

With so much riding on this vote, the White House and its GOP opponents have propelled the special election onto center stage. Both Republicans and Democrats have poured money into a race that Coakley once led in polls by as many as 30 points. During his briefing Friday, White House Press Secretary Robert Gibbs said the election will be "a referendum on whose side you are on" in the healthcare battle.

The Democrats' chief concern is being prepared to try and hold the seat if the outcome is close. Recounts are much easier to mount if the margin of victory is less than half of one percent, according to state election rules.

Democrats are likely to be well prepared --- the lawyer for the Democratic Senatorial Campaign Committee is Marc Elias, who oversaw the Minnesota recount that led to Sen. Al Franken's victory.

When reached at his office, Elias declined to talk about any preparations.

Should Brown prevail by a sizeable margin, Democrats could still slow the process enough to prevent him from being seated in time for a healthcare vote, election law experts said.

Brown would have to be both certified the winner and formally seated in the Senate before he would be eligible to cast a vote. Both steps are overseen by Democrats.

C ertification can only come when each of the state's 351 towns and cities have completed their ballot counts, forwarded the results to Secretary of the Commonwealth Galvin -- an elected Democrat -- who then submits them to the governor and the Governor's Counsel for a final review and signature.

Under the rules, the process can be held up for 10 days while local election officials wait for ballots coming in from troops overseas. Then the ballots go to the Governor's Counsel , which meets once-a-week, on Wednesdays. And no rules dictate how quickly the governor must follow through with a signature before returning the paperwork to Galvin.

McNiff, Galvin's spokesman, said he does not expect any change in the process, regardless of the election's outcome.

"There's never been a question here of holding on to this material," McNiff said. "It's done as soon as they get the results."

If there is delay, one campaign lawyer researching the matter said they can go to court to try and force a certification.

Even after the certification is complete, it will be up to the Senate leadership to seat the eventual winner. When asked whether the Republicans would have any reason to fear a delay, Jim Manley, a spokesman for Majority Leader Harry Reid, D.-Nev., said he doesn't engage in hypotheticals. But he said he did not expect any deviation from the usual process.

"When the certification papers come to the Senate and the vice president is available, the winner will be seated," Manley said.

Republican strategists say there would be no need to wait for the vice president. The statute says the oath may also be administered by the Senate's presiding officer or the assistant secretary.

If there were a delay in the Senate, one Republican lawyer reviewing the matter said, the Democrats would have to weigh the potential for a political backlash.

"If Massachusetts certifies someone and the senate says they're not going to seat them, that's a political call," the lawyer said.

Click Here for the Blotter Homepage.