The United States stepped back from the brink of default on Tuesday but congressional approval of a last-ditch deficit-cutting plan failed to dispel fears of a credit downgrade and future tax and spending feuds.

President Barack Obama and lawmakers from across the political divide expressed relief over the hard-won compromise to raise the country's borrowing authority after weeks of rancorous partisan battles.

Nevertheless, U.S. stocks tumbled, turning negative for the year, as investors shifted their attention to the increasingly grim state of the U.S. economy and the potential for a downgrade of America's gold-plated debt rating.

That risk grew when one of the three major ratings agencies said it was affirming the U.S. government's AAA-rated sovereign debt but slapping it with a negative outlook.

The announcement by Moody's Investors Service after U.S. markets closed could lead to a downgrade within 12 to 18 months. That could raise borrowing costs for U.S. companies and consumers as the economy risks slipping back into recession.

The Senate's approval by 74-26 votes of the $2.1 trillion deficit-reduction plan warded off the immediate specter of a catastrophic U.S. debt default. The bill passed the Republican-controlled House of Representatives on Monday.

Obama immediately signed it into law, lifting the $14.3 trillion debt ceiling with just hours to spare before the government was due to run out of money to pay all its bills.

The bitter feud between Democrats and Republicans has bruised Obama as he heads into a campaign to win a second term in 2012.

The $2.1 trillion deficit-reduction plan fell well short of a $4 trillion 'grand bargain' that was nearly agreed last month between the White House and congressional leaders.

Another ratings agency, Standard & Poor's has said $4 trillion in deficit-reduction measures would be needed as a downpayment to put America's finances in order.

S&P said in mid-July there was a 50-50 chance it would cut the U.S. rating in the next three months if lawmakers failed to craft a meaningful deficit-cutting plan. Investors are on tenterhooks about the chance of a downgrade by S&P.

The deal leaves political battles ahead over spending cuts and tax reform as the deficit-cutting plan is implemented. Obama and Democratic and Republican leaders said the agreement, while a welcome first step, was not enough on its own.

We just kicked the can down the road ... the agreement doesn't really do anything about what got us into debt, Republican Senator Lindsey Graham told Reuters Insider.

We had a good opportunity, we let it pass so we will keep struggling.

THREAT OF CHAOS RECEDES

The deal drew a line -- for the moment -- under months of bitter partisan squabbling over debt and deficit strategy that had threatened chaos in global financial markets and dented America's stature as the world's economic superpower.

The law lifts the debt ceiling enough to last beyond the November 2012 elections, calls for $2.1 trillion in deficit savings spread over 10 years and creates a bipartisan joint House and Senate committee to recommend further cuts by late November. It does not yet include any tax increases.

International Monetary Fund chief Christine Lagarde said the deal reduced uncertainty in the markets.

The governor of the central bank of China, the biggest foreign holder of U.S. Treasuries, urged the the United States to responsibly protect investor interests.

Questions lingered about the fragile U.S. economy and whether the bipartisan deficit-cutting compromise could deliver the desired results.

Data on Tuesday showed U.S. consumer spending dropped in June for the first time in nearly two years and incomes barely rose, the latest in a string of gloomy economic indicators.

Moody's said the deal was a step toward fixing the budget problems but the United States risked a downgrade if fiscal discipline weakened in the coming year, if no further steps were taken in 2013 or if the economy deteriorated.

We would expect that growth would accelerate in 2012 from the first half of the year, Steven Hess, Moody's top U.S. analysts told Reuters in an interview. But if it doesn't, that means that the whole process of fiscal consolidation and the plans to achieve lower deficits and lower debt ratios will be made all the more difficult.

Fitch Ratings did not rule out putting a negative outlook on the U.S. AAA rating when it concludes a review of the country later this month, the agency's top analyst for the United States told Reuters on Tuesday.

TUSSLE OVER TAXES

Investors said the move by Moody's on Tuesday was expected and did not ruffle financial markets.

Earlier, Wall Street stocks slumped broadly by more than 2 percent, ending down for a seventh consecutive session as gloom over the economy mounted, marking the longest losing streak since the financial crisis period in October 2008.

I think that the most troubling aspect we have going on right now is the performance of U.S. equities. The equity market for whatever reason seems to think that this deal is not sufficient, said Greg Salvaggio, senior vice president at Tempus Consulting in Washington.

U.S. Treasury Secretary Timothy Geithner said in an opinion piece in the Washington Post that the debt deal should allow room for Congress to implement short-term measures to strengthen the economy this fall such as extending a payroll tax cut and funding infrastructure projects.

Obama said the sacrifices required to reduce the deficit needed to be fairly shared, apparently nodding to anger among many Democrats that the deal did not include tax increases and risked hurting social programs.

We cannot balance the budget on the back of the very people who have borne the brunt of the recession ... everyone is going to have to chip in, that's only fair, the president said in an address from the White House Rose Garden.

He said he expected tax reform to emerge from deliberations by the new congressional committee, and that a balanced approach in which the wealthier pay more taxes was needed.

Only moments after final passage, rival congressional leaders were handing out their political recipes for the way forward -- Republicans in favor of more spending cuts, and Democrats looking for tax reform or hikes.

(Additional reporting by Jeff Mason, Thomas Ferraro, Donna Smith, Richard Cowan, Lesley Wroughton, Laura MacInnis, Alister Bull and Steve Holland in Washington and Chris Sanders in New York; Writing by Stuart Grudgings and Pascal Fletcher; Editing by Jackie Frank and Anthony Boadle)