NEW YORK (Fortune) -- The United States isn't in jeopardy of losing its gold-plated credit rating, though by one measure America is closer to the ratings-downgrade danger zone than Spain.
That's according to credit rating agency Moody's. In a quarterly report about sovereign debt, Moody's analysts wrote that despite market worries about rising government debt levels, there is "no imminent rating pressure" for the United States and other big governments carrying its highest triple-A rating.
But the report added that these governments' margin for error "has in all cases substantially diminished," thanks to a weak outlook for economic growth and enormous debt loads taken on to quell the financial meltdown of 2008-2009.
Cutting back on public spending too soon risks a double-dip recession, Moody's said, while leaving stimulus measures in place too long could lead to a sharp rise in interest rates "with more abrupt rating consequences a possibility."
What's more, governments that wish to avoid credit downgrades may need to implement harsh and potentially unpopular policies. The Moody's analysts, led by London-based managing director Pierre Cailleteau, wrote that "preserving debt affordability ... will invariably require fiscal adjustments of a magnitude that, in some cases, will test social cohesion."
Nor can big developed countries expect to export their way to health on the back of booms in emerging markets such as India and China. "Demand from the emerging world undoubtedly provides some support, but cannot on its own compensate for weak domestic demand," Moody's said.
In the case of the United States, interest payments on general government debt -- combining the federal government with the states -- could rise above 10% of revenue by 2013, according to the report.
That's the level at which the rating agency typically considers a downgrade. Moody's said debt affordability is the key factor to consider in ratings decisions, because debt costs are apt to constrain policymakers.
The report notes that U.S. debt service costs could rise from around 7% in 2009 to 11% in 2013 under Moody's baseline scenario, which calls for a muted economic recovery and a moderate interest-rate shock.
In this forecast, Moody's analysts expect the yield on the five-year Treasury to be above 4% by 2012, a level it hasn't reached since the end of 2007. It was around 2.4% Monday.
U.S. debt service costs are higher in 2013 under the Moody's assumptions than in any of the other major triple-A-rated governments -- the United Kingdom, Germany, France and Spain.
Moody's cautioned that debt service costs alone don't drive the decision, and noted the key role of politics in driving longer-term fiscal policies. The analysts said it would only downgrade a triple-A government's debt if analysts "concluded that the government was unable and/or unwilling to quickly reverse the deterioration it has incurred."
Accordingly, Spain continues to carry Moody's highest rating in spite of its inclusion in a Wall Street epithet for fiscally challenged countries around Europe's periphery, the PIIGS (Portugal, Italy, Ireland, Greece, Spain). Spanish government finances have been hammered by the collapse of a major housing bubble and unemployment is near 20%.
The rating agency acknowledged that "Spain's debt affordability has already deteriorated significantly and is expected to deteriorate further," to a level near the point at which Moody's might consider a downgrade to double-A.