BOSTON (AP) — Democrats struggled to hold on to the late Edward Kennedy’s Senate seat in a pivotal election Tuesday that could determine the fate of President Barack Obama’s agenda, including his effort to overhaul the U.S. health care system.

Republicans relished the opportunity to hand the rival party an embarrassing defeat in traditionally liberal Massachusetts. Democrats fear the tight race could be a harbinger of huge losses in November elections, when their party’s control of both houses of Congress will be at stake.

Democrats until just a week ago considered the race a lock for their candidate, state Attorney General Martha Coakley, but now have been forced to scramble for votes in a state where Democrats outnumber Republicans 3-1.

Republican Scott Brown, a little-known state senator, has rode a wave of voter anger with Obama’s health care plan, high unemployment and what critics call big government spending to pull the race even.

A win by Brown would eliminate the Democrats’ 60-seat supermajority in the Senate and imperil some of Obama’s key legislative objectives. The Democrats need all 60 votes to overcome Republican delaying tactics in the 100-seat Senate.

In contrast to the light turnout for the party primaries last month, both candidates expected heavy a turnout following the national attention thrust upon their race. As polls opened Tuesday, there was a clear sign of at one polling place: A line of cars stretched for nearly a half-mile (a kilometer) from the gymnasium at North Andover High School, the polling place for a community of about 30,000 about a half-hour north of Boston. Some drivers turned around in exasperation.

In Washington, White House aides and Democratic lawmakers have been hashing out plans to save the health care bill in case of a Brown upset. The likeliest scenario would require Democrats in the House of Representatives to accept a bill the Senate passed last month, despite their objections to several parts. Obama could sign it into law without another Senate vote needed. House leaders would urge the Senate to make changes later under a complex plan the would require only a simple majority.

Obama has made overhauling the U.S. health care system, which leaves nearly 50 million people uninsured, his top domestic priority. Kennedy, a brother of late President John F. Kennedy, was a longtime champion of the cause.

Massachusetts officials say it could take more than two weeks to certify the election results, which also may give Democrats more time to push the health care bill through in case Brown wins.

Brown’s swift rise has spooked Democrats who had considered the seat one of their most reliable. Kennedy, who died in August, held the post for 47 years. The last time Massachusetts elected a Republican to the U.S. Senate was 1972.

Brown has tried to turn Democrats’ expectation of an easy win to his advantage, proclaiming, “It’s not the Kennedy seat, it’s the people’s seat.”

With the stakes so high, Obama campaigned for Coakley in Boston over the weekend and also appeared in television ads on her behalf. “Every vote matters, every voice matters,” Obama said in the ad. “We need you on Tuesday.”

The Massachusetts election comes just before Obama’s first anniversary in office. Obama was soaring in the polls when he was inaugurated as the first black U.S. president last Jan. 20, but voters’ mood has soured over the past year, as the job market has remained stagnant.

A Suffolk University survey taken Saturday and Sunday showed Brown with double-digit leads in three communities the poll identified as bellwethers, but internal statewide polls for both sides showed a dead-heat.

A third candidate, Libertarian Joseph L. Kennedy, was polling in the single digits but says he’s staying in. He is no relation to the late senator.


AP National Political Writer Liz Sidoti in Washington and AP writers Steve LeBlanc, Beth Fouhy and Glen Johnson in Boston contributed to this report.