During the Gold Rush, Stockton was one of the largest and most prosperous cities in California – but no more. On Thursday, the Central Valley town announced that it was insolvent and became the largest city in U.S. history to declare bankruptcy. There’s no doubt that other such bankruptcies will follow, considering how the brutal recession and sluggish recovery have battered state and local finances over the past few years. But the key economic question is whether these will be exceptional cases or whether there will be a nationwide string of local bankruptcies that could rock the entire country’s finances.

Some analysts have long believed that municipal finances were a disaster waiting to happen. Prominent financial services analyst Meredith Whitney, who foresaw trouble at Citibank and Lehman Brothers prior to the banking crash, subsequently warned of possible widespread municipal financial crises. In an interview in late 2010 she said that 50 to 100 local governments could potentially default, with losses totaling hundreds of billions of dollars. That obviously hasn’t happened yet. And since such defaults have never occurred on even a tenth of that scale, some critics have accused Whitney of overreaching. Nonetheless, the finances of many local governments have continued to deteriorate, and states have become less willing – and perhaps less able – to bail out counties, cities and towns that get into serious trouble.

Some of these areas suffer from particular local problems. In the 1980s, Houston had its “see-through buildings” – commercial properties with no tenants – after the oil-fueled building boom of the 1970s was followed by a bust in the mid-’80s. Today, Las Vegas and Reno are hurting because gambling has dropped off in the recession. And the Gulf Coast of Florida has suffered from a slowdown in tourism and in people moving to the state. Moreover, both areas experienced a boom and bust in real estate.

In a way, Stockton has been a victim of the broader regional economic boom-and-bust cycle. When real estate prices were soaring in California, Stockton benefited because it attracted people who were willing to commute 80 miles to San Francisco. But when the real estate wave receded, there wasn’t a lot to keep the economy going, since the Central Valley is dependent on agriculture and has a lot of local poverty. Other towns in the area, such as Sacramento and Fresno, are having similar difficulties.

Nevertheless, Stockton deserves it’s own share of the blame. When times were good, the city launched a number of expensive civic projects and substantially increased benefits for public sector workers. Today the city faces a $26 million budget deficit and is trying to close most of it by slashing employee benefits and suspending debt payments. In addition, the California Public Employees’ Retirement System (Calpers) figures that Stockton’s pension plan is underfunded by $147 million.

So the question is, to what extent do the problems of a place like Stockton foreshadow the future for municipal governments around the country? There are three parts to the answer:

The good news is that state and local borrowing is small compared with the national debt. State and local debt exceeded Federal borrowing 100 years ago. But today state and local obligations total less than a fifth of the Federal amount. Even if you exclude the Social Security Trust Fund – money the Federal Government owes to itself – state and local borrowing is just around 30% of national debt. Meredith Whitney’s dire-sounding projection of hundreds of billions of dollars at risk has to be viewed in the context of a muni bond market totaling more than $3 trillion and a gross national debt of more than $15 trillion.

Another reason for cautious optimism is that not all local governments are in the same amount of trouble. Many localities have avoided truly serious financial problems in the recent recession. The greater Washington, D.C. area, for example, has benefited from the steady growth of government, while New York City continues to be buoyed by the financial sector and foreign money. Many smaller localities are also faring well, such as San Antonio, Salt Lake City, Charleston and Raleigh, N.C. This divergence cuts both ways, however. While much outstanding local debt was issued by cities and towns that are still financially solid, those that are in trouble are in real trouble and possibly beyond saving — think Detroit.

Now the bad news: The crisis for localities is much closer than it is for the Federal government. The National debt may be huge and growing fast, but Washington can easily put off dealing with it for at least another five years — and probably for more than a decade — before a true crisis erupts. Municipal debt may be much smaller, but sometimes immediacy counts more than size. After all, Greece has managed to destabilize the entire euro zone even though it accounts for less than 3% of the total economy.

Stockton will not be the last of the big municipal bankruptcies. Indeed, it is not the first. Vallejo, Calif., suffered a similar bankruptcy in 2008. And 10 of the 42 significant municipal bankruptcies since 1981 have occurred in the past four years. Moreover, city revenues are still declining, on average, and two-thirds of municipalities are cutting back in one way or another. In short, while the risks of local bankruptcies are much smaller in scale than those posed by the $15 trillion-plus national debt, the time horizon is much closer. For municipalities, the deadline isn’t a decade away — it’s the day after tomorrow.

Unlike the Federal Government, states are required to balance their budgets and the Federal Reserve won't print money and buy up their debt. So I'm expecting quite a few large cities to declare bankruptcy in the next few years. Cities don't general broadcast to the world that they are in trouble so you don't generally find out about it until just before the poo hits the fan. Don't be fooled. They can move funds around for a while to give the appearance of being solvent and even waste money on pet projects to give the appearance of prosperity, but eventually it catches up with them.

Hold on buddy. The elected officials, not the employee unions, hired something called Actuaries to tell government officials how much money it would take to fund the employee pension funds! The unions did have nothing to do with it. If you have a problem with it, sue, complain, B%$amp; about the Actuaries,...not about the employees and or their Unions. Wake up America. do you want your children and grandchildren to live in Third World Countries like this commenter suggests?