The Senate passed a deal Wednesday night to raise the nation's debt limit and end the 16-day-old partial shutdown of the federal government, moving Congress closer to ending one of the most bitterly partisan and protracted standoffs on Capitol Hill in recent memory.
The measure, which does not include Republican-sought provisions to defund or delay Obamacare, now moves to the House, which was expected to pass the bill within hours after resisting similar measures.
"Today, thankfully, compromise has overcome conflict. Cooler heads prevailed," said Sen. Max Baucus, D-Mont. "This bipartisan agreement will help pull us back from the edge."
The deal, which passed 81-18, was hammered out by Senate Majority Leader Harry Reid, D-Nev., and Senate Minority Leader Mitch McConnell, R-Ky. It would fund the partially shuttered federal government until Jan. 15 and raise the debt ceiling through Feb. 7.
Assuming the House passes the bill, President Obama said he would immediately sign it as soon as it crosses his desk.
"We'll begin reopening our government immediately and we can begin to lift this cloud of uncertainty from our businesses and the American people," he said.
The compromise leaves Obamacare almost untouched despite weeks of fighting by conservatives to defund or delay the new health care law.
The measure doesn't include anti-Obamacare provisions that Republicans wanted, like a delay in the 2.3 percent medical device tax or the cancellation of health care subsidies paid to Congress and its staff, though both were part of earlier proposals.
The one Obamacare provision the bill does include calls for the government to verify the incomes of those seeking health insurance subsidies. The provision represents a small gain for the GOP lawmakers who had hoped the debt ceiling talks would yield at least a delay in the entire law.
The measure includes one other small victory for the GOP: It doesn't include a provision that would have allowed union workers to escape paying a $63 health insurance tax mandated under the Affordable Care Act.
The proposal also would provide back pay for the furloughed federal workers.
All 18 "no" votes were cast by Republicans, while 27 in Republicans supported the measure.
During the standoff, Obama vowed he wouldn't pay "ransom" by yielding to Republican demands for significant changes to Obamacare in exchange for funding the government and permitting Treasury the borrowing latitude to pay the nation's bills.
Reid said the nation "came to the brink of disaster" before reaching the deal with McConnell.
"The compromise we reached will provide our economy with the stability it desperately needs," Reid said.
McConnell stressed that the deal preserved a round of "sequester" spending cuts negotiated in 2011 with Obama and Democrats.
"And we're not going back on this agreement," McConnell said.
After Reid and McConnell were finalizing their deal Monday, negotiations were put on hold for most of Tuesday after House Republican leaders tried one last frantic shot at drafting their own proposal. But their plan collapsed after it was rejected by conservative Republicans who said the effort didn't go far enough to stop Obamacare.
With the Senate leaders announcing the deal Wednesday morning, all eyes turned to Sen. Ted Cruz, R-Texas, the Tea Party favorite who vowed to block any government funding bill that didn't include provisions to stop Obamacare.
Cruz later announced he wouldn't block the deal, almost guaranteeing the bill would pass before the Thursday debt-limit deadline. Yet the firebrand Texan didn't exit quietly, railing against the bill on the Senate floor just prior to the vote.
"This is a terrible deal," he said. "This embodied everything about the Washington establishment that frustrates the American people."
Though Democrats got the better of the deal they were careful not to gloat, with Sen. Charles Schumer of New York, the Senate's No. 3 Democrat, saying the deal hardly called for "exultation and happiness."
"To say that this is a good day because one party might be doing better than another, no," the Democrat said on the Senate floor.
"It's a day that is, in a certain sense, grim. We have finally achieved our goal; the same place where we started but at a cost."