Public spending cuts and tax hikes after the next election should enable the UK to hang on to its gold-plated triple A credit rating, a leading agency said today.
Moody's said it assumed that an adjustment to Britain's public finances would keep the country from toppling from the top-rated threshold.
But the agency warned that the UK's ballooning gross public debt meant it had lost "some altitude" in the triple A category and would need to "severely adjust" fiscal policy even in the unlikely event of a sharp upturn in the economy.
Both the UK and US were afforded "resilient" status by Moody's in their new quarterly ratings update - more stable than "vulnerable" but a step down from "resistant".
The ratings firm said the countries were both showing signs of recovery despite heavy debt burdens, but warned "our assumptions in terms of economic dynamism and fiscal adjustment capacity may be put to the test in the coming years".
In the UK's case, Moody's said the willingness of a future Government to tackle the public finances would be crucial to keeping the country from losing its gold standard rating.
"Even though its debt metrics have deteriorated considerably and, in the baseline scenario, it has come very close to the AAA-AA demarcation zone, we assume that the adjustment to the UK's public finances that is likely to take place in the context of the forthcoming elections - probably through cuts in spending - will keep that debt trajectory within AAA boundaries," the report said.
The firm cautioned that "genuine fiscal consolidation cannot be expected to take place (or even be announced in a credible manner)" before the election, which will take place at the latest in spring of next year.
"Still, broad acceptance among the public of the inevitability of cuts in government expenditure and tax increases suggests such consolidation is at least possible," Moody's added.
Yesterday, both Chancellor Alistair Darling and Tory leader David Cameron signalled a willingness to curb public spending.
The Chancellor has indicated net borrowing over the year will reach £175 billion as recession hits tax revenues, while spending on unemployment benefit soars.
Moody's said the UK's gross public debt had almost doubled - to above 80% of GDP - in three years and it did not expect it to stabilise "for many years to come".
Last month official figures showed that the nation's net debt, at £800.8 billion, accounted for 56.8% of gross domestic product (GDP), its highest since the Office for National Statistics measure started in 1974.
Earlier this year rival ratings agency Standard & Poor's (S&P) said UK national debt could rise to 100% of output by 2013, leading to the UK losing its coveted triple A status.
It is the first time the nation's gold standard rating had come under threat since S&P began assessing the UK's sovereign debt in 1978.
But today Moody's said one positive had come in the form of an update from UK Financial Investments (UKFI), the body in charge of managing the government's stake in rescued banks.
UKFI, which controls the state's holdings in Royal Bank of Scotland and Lloyds Banking Group, reported in July that it was sitting on paper losses of £10.9 billion, around £7 billion less than the figure in February.
Moody's said the improvement "illustrates the plausibility of the government support to banks yielding a loss that is a fraction of the debt raised to finance it, or even generate a profit".
The agency said that while there were conflicting signs on the health of the UK economy, it did now "appear to be stabilising" but was "not yet on a solid recovery path".
Moody's, which stripped Ireland of its triple A status in July, said it did not expect to make any further downgrades in the near future.
Spain, which had shared its "vulnerable" rating with Ireland, was "a safe distance" from losing its status with better-than-expected economic growth.
Meanwhile, France and Germany, two of the top-rated "resistant" countries, were said to have been more affected by the economic downturn than expected, but had rebounded faster.