WASHINGTON - Rahm Emanuel was agitated. The opportunity to pass President Obama's top domestic priority before year's end seemed to be slipping away. It was already early November. The Senate was taking too long.

With Democratic senators and aides gathered in a conference room outside Majority Leader Harry Reid's office, Emanuel, Obama's chief of staff, wanted to know: Was there a chance the chamber could still act in the seven weeks before Christmas?

For Emanuel, impatient to begin with and conditioned by his years in the faster-paced House, the Senate's sluggish pace was maddening. But Sen. Charles E. Schumer (D., N.Y.) told him there was one chance it could be done: The White House would have to step back and put its trust into an unlikely vessel: Majority Leader Reid.

A quirky Nevadan with no background in health policy and a less-than-commanding public image, Reid, 70, may not have inspired instant confidence. But Emanuel agreed. And yesterday, having united his caucus and blocked a series of Republican filibusters, Reid delivered on the most sweeping health-care legislation to move through the Senate in nearly half a century.

Reid's effort at times revealed an unseemly side of congressional business as he struck bargains with senators who traded their votes for aid to their states. Deals always have been part of how Congress operates, but the health-care battle came in a fishbowl of public scrutiny - giving Republicans a fat target for attack.

"This bill is a mess, and so is the process that was used to get it over the finish line," Minority Leader Mitch McConnell (R., Ky.) said this week in a taste of what figures to come as the 2010 midterm election season begins.

If the process opened the Democrats to criticism, it also revealed that the oft-fractious party could achieve unity. The key was two particular qualities Reid had in abundance: an unparalleled understanding of the arcane institution he leads, and a grasp of the particular needs of the individual lawmakers who serve there.

"So many people find Harry Reid incomprehensible as a leader in large part because he is so unprepossessing as a public speaker," said Ross Baker, a Rutgers University political scientist. "There are Senate leaders . . . who come along every few decades, who really know the ins and outs of the chamber and have an intuitive understanding of the political sensibilities of each of their colleagues."

In the end, Reid persuaded purists of a government-based program to accept that their holy grail was out of reach. He led reluctant Democrats to cave to drug-industry interests. The Senate's most ardent antiwar member voted to move a war-funding bill to make it possible to meet the Christmas deadline for the health bill.

But in the eyes of Reid and his party, the payoff was a huge accomplishment: The $871 billion bill would expand coverage to include 31 million more people over the next decade while taking steps to begin changing the way Americans get their health care.

Reid knew that all but a handful of the 60 members of the Democratic caucus would back some form of a public option. But the handful who opposed the idea were stubborn - and powerful enough to keep it out of the Finance Committee version of the bill.

It was clear from the start that winning over a simple majority of Democrats would not be enough. With the GOP promising to filibuster at every opportunity, Reid would need 60 votes to prevail.

"Harry laid out where he thought things were," said one participant at a Nov. 30 meeting. "He thought he had something over 55 votes, but didn't have 60. . . . We walked through the people who were open question marks and talked about how much of a coordinated effort we could make."

After securing the 59th vote, in Joe Lieberman (I., Conn.), and reeling in No. 60, Sen. Ben Nelson (D., Neb.), Reid last week confronted a roadblock that turned out to be a blessing in disguise.

Democrats found themselves one short of the votes they needed to quash a GOP filibuster of the defense bill and get back to the health debate. Sen. Russ Feingold (D., Wis.), an ardent war critic, had pledged to oppose the funding, and Republicans planned to block the bill.

When Democrats gathered for yet another special caucus meeting that night, Reid was unwilling to challenge Feingold for voting his conscience and conceded they probably would have to miss the Christmas deadline.

But as dejected senators began to leave, Feingold called for attention. He would put aside his personal convictions on the war, he said, and vote with his party to foil the Republicans' delaying tactics.

Said Sen. Benjamin Cardin (D., Md.), "I don't think there was a dry eye in the caucus room."