Correction: A previous version of this editorial incorrectly stated that Detroit had $3.8 trillion in unfunded pension liabilities. State and local pension plans have $3.8 trillion in liabilities, $1 trillion of which is unfunded. The editorial has been updated.

DETROIT’S MUNICIPAL bankruptcy is undeniably unique in one respect: This is the largest U.S. city to ask a federal court for protection against its creditors, whether you measure by population (approximately 700,000) or by accumulated debt (up to $20 billion).

For Americans beyond Detroit’s borders, the relevant question is what else might be unique about the Motor City’s tragedy — and what might be applicable to other counties, cities and towns.

In many ways, Detroit is one of a kind, starting with its near-total dependence on an industry, automobile manufacturing, that has been shrinking for decades. Racism and racial tension plague many cities, but Detroit’s experience with both has been particularly damaging, as shown by bloody upheavals in 1943 and 1967 — and the massive flight of middle-class residents, mostly white, that began after the latter event and never really ended.

An unusual geography conspired against the city’s solvency; with a thinning population spread out over 140 square miles, it became increasingly unworkable to provide police, fire and other services. Many cities have seen corruption, but the reign of former mayor Kwame Kilpatrick from 2002 to 2008 might have set some kind of record. He faces 20 years or more on a federal bribery and extortion conviction.

But we’re more impressed with what Detroit has in common with other jurisdictions. Specifically, the city is reaping what it sowed by promising public employees pay and benefits — especially health insurance and pensions for retirees — that it could not afford, and then borrowing for years to paper over the mistake. Similar issues were at the heart of three large municipal bankruptcies, in the California cities of Vallejo, Stockton and San Bernardino. A new survey by scholars at Boston College finds that state and local pension plans have $3.8 trillion in liabilities, $1 trillion of which is unfunded.

Obviously, many jurisdictions included in that figure are currently managing their obligations well. But even a highly rated city, Chicago, just got marked down by Moody’s because of its $19 billion unfunded pension liability. The point is that long before cities reach the point of insolvency, unaffordable promises to their public-sector unions can raise borrowing costs and crowd out other public needs — such as parks, libraries, sanitation and public safety. And that’s not good for retaining a tax-paying middle-class population. Cities and states that wish to avoid a Detroit-like death spiral should start putting their retirement systems on a sustainable path now.

Neither the lenders who enabled Detroit’s excessive spending nor the unions that demanded such largess would accept pennies on the dollar from emergency manager Kevyn Orr, which is why he had to tell them, “See you in court.” Bondholders grumble that even partial repudiation of Detroit’s general-obligation paper could set a bad precedent for the municipal market as a whole. Unions, meanwhile, wave the Michigan constitution, which, like others around the nation, purports to make their pensions inviolable contracts.

What both categories of Detroit claimants, and the wider American public, are about to find out is just how strongly federal bankruptcy law favors debtor municipalities — state laws and collective-bargaining pacts notwithstanding — and therefore how smart it was to behave, for so many years, as if this day could never come.