After fervent New Year brinkmanship, the US Congress finally backed a deal to avert a "fiscal cliff" of tax hikes and slashing spending cuts that had threatened to unleash economic calamity.
As global stock markets made their 2013 debut, the House of Representatives passed a deal between the White House and Senate Republicans to raise taxes on the rich and put off automatic $109 billion budget cuts for two months.
The deal passed the Senate early on Tuesday, but its fate hung in the balance for hours as House conservatives sought to amend it to include big spending cuts, which would likely have killed it.
In the end, the House voted 257 votes to 167 to pass the original bill with minority Democrats joining a smaller number of majority Republicans to pass the legislation after a bitterly contested and unusual session on New Year's Day.
President Barack Obama planned to make brief remarks at the White House within minutes of passage of the deal, which relieved investors who feared that continued logjam could have sent global stock markets spinning.
Had the deal splintered, all Americans would have been hit by tax increases and the spending cuts would have kicked in across the government, in a combined $500 billion shock that could have rocked the fragile recovery.
The House vote took place after a conservative rebellion fizzled when it became clear there were not sufficient votes in the restive Republican caucus to send an amended version of the bill with spending cuts back to the Senate.
Republican party leaders ultimately feared they would carry the can if the deal collapsed, leaving Americans enraged by higher taxes and the prospect that an economy slowly recovering from crisis could be plunged back into recession.
The angry political feuding which spanned the Christmas and New Year holidays reflected the near impossibility in forging compromise in Washington, where power is divided between a Democratic president and Republican House.
It also was a signal that Obama, despite a thumping re-election win in November, may find tough sailing for his major second term legislative goals, including immigration reform, clean energy legislation and gun control.
The truce in Washington's dysfunctional, divided Congress is likely to be brief, given the fight that will ensue over the spending cuts that now looms at the end of February as well as over regular budget bill extensions.
Those fights will be paralleled by one over Obama's request for Congress to lift the country's $16 trillion borrowing limit. Republicans are demanding concessions on expenditures while Obama has warned he will not bargain.
Democratic congressman Jim Moran warned that Tuesday's deal would simply "set up three more fiscal cliffs."
"We're going to look back on this night and regret it."
Earlier, House Speaker John Boehner's coalition vented fury that the deal had not contained significant spending cuts to eat into national debt.
"We have to in some way address spending," Republican congressman Spencer Bachus said.
The powerful number two Republican in the chamber Eric Cantor had injected momentum into the rebellion after he told a high-stakes meeting of the party caucus that he was opposed to the bill.
The deal to avert the fiscal cliff agreed on Monday raised income taxes only on households earning $450,000 a year and exempted anyone else.
The vote represented a win for Obama as it raises taxes on the richest Americans in line with a re-election campaign promise -- albeit above an income threshold higher than he and other Democrats had wanted.
The deal also includes an end to a temporary two percent cut to payroll taxes for Social Security retirement savings -- meaning all Americans will pay a little more -- and changes to inheritance and investment taxes.