The US Senate has passed a sweeping healthcare reform bill, bringing Barack Obama a step closer to enacting one of his signature campaign promises and to meeting a goal sought by US presidents for decades.

The early-morning vote in the first Christmas Eve session for decades came after months of intense negotiations by the president's allies in the Senate, who were forced to wrangle for every Democratic vote in the chamber to overcome Republican opposition.

Obama welcomed the outcome, saying it brought decent healthcare closer to all Americans. "We are now finally poised to deliver on the promise of real, meaningful health insurance reform," he said at the White House. "With today's vote, we are now incredibly close to making health insurance reform a reality in this country. Our challenge then is to finish the job."

The $871bn bill will be merged with similar legislation passed by the House of Representatives, with a final version expected to reach the president's desk by mid-February.

Negotiators will have to iron out differences between the two bills on coverage for abortion. Among other distinctions, the Senate-passed bill does not establish a government-run health insurance programme, a provision sought by Obama and congressional liberals.

The Senate bill passed on a 60-39 party line vote.

The overhaul is expected to extend health insurance to 30 million Americans who currently lack it. For the first time, Americans will be required to obtain health insurance, and insurers will be forbidden from denying coverage based on patients' pre-existing conditions.

Those who cannot get insurance through their employers will have access to a government-regulated health insurance exchange and may receive subsidies. A government-run insurance programme for the poor will be vastly expanded.

The bill was denounced by Republican leaders who vowed to maintain their opposition, despite using every parliamentary tool permitted to slow the legislation's progress. They say the bill is too costly and amounts to a government takeover of healthcare. The party hopes that voters infuriated by the bill will turn the Democrats out office in the November 2010 elections.

"This debate was supposed to produce a bill that reformed healthcare in America," said the Republican senate leader, Mitch McConnell. "Instead, we're left with party line votes in the middle of the night, a couple of sweetheart deals to get it over the finish line, and a public that's outraged."

The bill has angered the president's allies on the left, who have criticised the exclusion of a public health insurance programme and restrictions on abortion coverage, both modifications necessary to win over conservative Democrats.

Senator Joe Lieberman, of Connecticut, an independent who is nominally allied with the Democrats, forced the removal of a public insurance programme, angering many Democrats, while Ben Nelson, a Nebraska Democrat, agreed to support the bill only after it was amended on insurance coverage for abortion.