WASHINGTON (AP) — Senate Democrats won a crucial test vote on President Barack Obama's health care overhaul, putting them on track for passage before Christmas of the historic legislation to remake the nation's medical system and cover 30 million uninsured.

All 58 Democrats and the Senate's two independents held together early Monday against unanimous Republican opposition, providing the exact 60-40 margin needed to shut down a threatened GOP filibuster.

The vote came shortly after 1 a.m. with the nation's capital blanketed in snow, the unusual timing made necessary in order to get to a final vote by Christmas Eve presuming Republicans stretch out the debate as much as the rules allow. Despite the late hour and a harshly partisan atmosphere, Democrats' spirits were high.

"Today we are closer than we've ever been to making Sen. Ted Kennedy's dream of universal health insurance coverage a reality," Sen. Tom Harkin, D-Iowa, said ahead of the vote, alluding to the late Massachusetts senator who died of brain cancer in August.

Kennedy's widow, Vicki, watched the vote from the visitor's gallery along with administration officials who have worked intensely on the issue. Senators cast their votes from their desks, a practice reserved for issues of particular importance.

The outcome was preordained after Senate Majority Leader Harry Reid, D-Nev., wrangled his fractious caucus into line over the course of the past several months, culminating in a frenzy of last-minute deals and concessions to win over the final holdouts, independent Joe Lieberman of Connecticut and conservative Democrat Ben Nelson of Nebraska.

Obama's oft-stated goal of a bipartisan health bill was not met, despite the president's extensive courtship of moderate Sen. Olympia Snowe of Maine, the only Republican to support the bill in committee. Obama called Snowe to the White House for lengthy in-person meetings both before he left for climate talks in Copenhagen and after his return on Saturday. In the end Snowe said she was "extremely disappointed" in what she called a rushed process that left scant time for her to review, much less amend, the bill.

Sen. John McCain, R-Ariz., criticized the side deals needed to win key votes.

"It's one of a great Bernie Madoff gimmicks that anybody's ever seen," McCain said Monday on ABC's Good Morning America today. "Republicans were never brought in to the negotiations. This is what you get — a split country — when American people are opposed to what we're doing."

Still, the vote represented a major victory for Democrats and Obama, who's now clearly in reach of passing legislation extending health coverage to nearly all Americans, a goal that's eluded a succession of past presidents. The legislation would make health insurance mandatory for the first time for nearly everyone, provide subsidies to help lower-income people buy it, and induce employers to provide it with tax breaks for small businesses and penalties for larger ones.

Two more procedural votes await the Senate, each requiring 60 votes, the first of these set for Tuesday morning. Final passage of the bill requires a simple majority, and that vote could come as late as 7 p.m. on Thursday, Christmas Eve.

The Senate measure still must be harmonized with the health care bill passed by the House in November before final legislation can be sent to Obama's desk.

There are significant differences between the two measures, including stricter abortion language in the House bill, a new government-run insurance plan in the House bill that's missing from the Senate version, and a tax on high-value insurance plans embraced by the Senate but strongly opposed by many House Democrats.

After Monday's vote a number of Senate Democrats warned that the legislation could not change much and expect to maintain support from 60 senators. House Democrats are sure to want to alter it but may have to swallow it mostly whole.

"It took a lot of work to bring this 60 together and this 60 is delicately balanced," Lieberman said.

In a statement Monday, Nelson said: "The Senate health care bill is not perfect. Yet it doesn't include a public option or taxpayer funding of abortion I worked to exclude."

Republicans are determined to give Democrats no help, eager to deny Obama a political victory and speculating openly that the health care issue will hurt Democrats in the 2010 midterm elections.

"There will be a day of accounting," warned John Cornyn, R-Texas, accusing Democrats of pushing a health overhaul opposed by the public. "Perhaps the first day of accounting will be Election Day 2010."

At their core the bills passed by the House and pending in the Senate are similar. Each costs around $1 trillion over 10 years and is paid for by a combination of tax and fee increases and cuts in projected Medicare spending. Each sets up new insurance marketplaces called exchanges where uninsured or self-employed people and small businesses can compare prices and plans designed to meet some basic requirements. Unpopular insurance practices such as denying people coverage based on pre-existing conditions would be banned, and young adults could retain coverage longer under their parents' insurance plans — through age 25 in the Senate bill and through age 26 in the House version.

Reid cut numerous last-minute deals to get the votes he needed and powerful Democrats also inserted home-state provisions in a 383-page package of amendments Reid filed this weekend to the 2,074-page bill.

Among other items, Senate Finance Committee Chairman Max Baucus, D-Mont., included a provision allowing residents of the town of Libby, Mont., who are suffering asbestos-related illnesses from a mining operation to get Medicare benefits. Nelson won a list of benefits for Nebraska including a commitment for the federal government to pick up the full tab of an expansion of Medicaid. And Sen. Christopher Dodd, D-Conn., who faces a difficult re-election, inserted a $100 million item for construction of a university hospital that his spokesman said he hopes to claim for the University of Connecticut.