The gold-plated credit rating of the United States — an article of faith across America and, indeed, around the world — may be at risk in coming years as the nation copes with its growing debts.

That sobering assessment, issued Monday by Moody’s Investors Service, provided a reminder that even Aaa-rated United States Treasury bonds, supposedly the safest of safe investments, could be downgraded one day if Washington failed to manage the federal debt.

Moody’s said the United States and other major Western nations, particularly Britain, have moved “substantially” closer to losing their gilt-edged ratings. The ratings are “stable,” but “their ‘distance-to-downgrade’ has in all cases substantially diminished,” the credit ratings agency said.

A downgrade would affect more than American pride. The bigger risk would be to the country’s ability to keep borrowing money on extremely favorable terms, and therefore to keep spending more money than it takes in from tax revenue.