America's House of Representatives has pulled the country back from the fiscal cliff after it agreed legislation triggering tax rises for the wealthy.
The bill reflects a bipartisan compromise struck earlier in the Senate and was pushed through by 257 votes to 167.
Although the House of Representatives is Republican controlled, the bulk of votes in favour of tax hikes were cast by Democrats.
'Today's agreement enshrines a principle into law that the deficit must be reduced in a way that is balanced,' President Barack Obama said after the bill was passed at around 11pm last night.
Although the late night agreement was enough to prevent the US from falling over the fiscal cliff, America's policy makers still face the challenge of agreeing spending cuts, which could prove far tougher than the negotiations over tax.
Analysts remained relatively upbeat though, and like markets broadly welcomed the news the House of Representatives passed the legislation.
'The deal passed in the Senate in the early hours of 2013 was not the grand bargain we hoped for, but, if approved by the House of Representatives, it will delay or permanently extend most of the elements of the fiscal cliff,' Societe Generale, the investment bank, said in a note to clients shortly ahead of the vote.