NEW YORK ( TheStreet) -- Moody's Investors Service confirmed its Triple-A rating on the U.S. government's debt late Tuesday after legislation to lift the debt limit and reduce the deficit finally secured passage earlier in the day.

But the credit ratings agency said its outlook is now negative on the United States, saying a downgrade would be in order if the federal government's fiscal discipline weakens in 2012; if additional "fiscal consolidation measures" aren't adopted in 2013; if the economic outlook worsens significantly; or if the government's funding costs rise well beyond current expectations.

"In confirming the Aaa rating, Moody's also recognized that today's agreement is a first step toward achieving the long-term fiscal consolidation needed to maintain the US government debt metrics within Aaa parameters over the long run," the agency said in its press release.

Moody's noted that the political rift illustrated by the tense negotiations for a deal to boost the debt ceiling could be a problem for the country going forward if the Democrats and Republicans prove unable to work together to continue fiscal reform. The agency sees a stabilization of the federal government's debt-to-GDP ratio "not too far above its projected 2012 level of 73%" by the middle of the decade as necessary, and voiced concern that Capitol Hill may be too dysfunctional to make this happen.

"Wide political differences that have characterized the recent debt and fiscal debate, if they continue, could prevent effective policymaking around that time," the firm said. "Measures that further reduce long-term deficits would be positive for the rating; a lack of such measures would be negative."

An increase in interest rates is also a potential roadblock.

"While Moody's and economic forecasters generally expect interest rates to rise over the next few years, a rise in borrowing costs above and beyond what is now expected would threaten efforts at fiscal consolidation," the firm said.

Stocks were slammed on Tuesday as the Dow Jones Industrial Average dropped nearly 300 points and the S&P 500 turned negative for the year with new fears about the fragile economic recovery coming to the forefront.

If you liked this article you might like

Market Preview: Crossing the Canyon

Market Preview: Hurry Up and Agree

Market Preview: Beyond the Cliff

Market Preview: Getting Conservative

Stocks Rally; Dow Reclaims 13,000