When unions agreed to a deal last month with Detroit city government to freeze the city’s underfunded pension system and create a new, less expensive one, some experts hailed it as a model that other troubled cities might adopt. News reports prominently mentioned governments with deep retirement debt, including Chicago and Philadelphia, as candidates for similar reforms. But the agreement came about under a Michigan emergency law that applies to struggling cities like Detroit, which is in bankruptcy. In many states, by contrast, local laws and state court rulings have made it virtually impossible to cut back retirement benefits for current government employees, even for work that they have yet to perform. These state protections, which go far beyond any safeguards that federal law provides to private-sector workers, are one reason why so many states and localities are struggling to dig themselves out of pension-system debt, amid sharp increases in costs. It will take significant reforms to state laws—or bigger and more painful bankruptcy cases—to make a real dent in the pension crisis.

The Detroit plan, negotiated by unions with the city’s emergency manager, Kevyn Orr, freezes the city’s current underfunded retirement plan so that workers will receive benefits for new work at a reduced rate. Under the old plan, an employee who worked for the city for 35 years and retired at 62 with a final salary of $60,000 could qualify for a pension of nearly $40,000. By contrast, if that same employee works the final ten years of his career under the new plan, his annual pension would be about $35,000. In addition, if the new plan becomes underfunded, the employee will have to contribute more of his own money to help cover the costs.

Detroit’s reforms aren’t unusual by the standards of the private sector, where a federal law, the Employee Retirement Income Security Act (ERISA), governs pensions. That legislation protects the benefits that a worker has already earned but allows employers to amend a pension plan for work that’s not yet been done, a move that can immediately reduce costs. Workers have the option of seeking employment elsewhere, of course, if they don’t like the new terms.

But federal law doesn’t apply to municipal retirement systems created by state legislation. In about two dozen states, courts have declared that laws creating pensions represent a contract between an employee and government whose benefits can never be reduced once a worker enters the retirement system. Many state courts—including those in Pennsylvania, Arizona, and Colorado—have been influenced by a series of California legal decisions (often referred to, collectively, as the “California Rule” on pensions) which hold that the pension contract begins immediately upon employment, and that the terms of a government worker’s pension can only change if the alterations are “accompanied by comparable new advantages,” or benefits. The California Rule, University of Chicago legal scholar Richard Epstein has written, “Neuters the power of local governments to alter and amend, by wiping out all government flexibility to correct prior errors in pension program design or funding.” One result, he observes, “is a financial death spiral” in many municipalities.

We see that spiral in California, where a number of municipalities entered bankruptcy in recent years, thanks in part to their inability to alter their unaffordable pensions. Courts, meanwhile, have short-circuited reform attempts. Voters in the city of San Jose, where pension costs have risen to $245 million, from $73 million in 2002, passed a ballot initiative in 2012 installing a new, less expensive pension system. But in December, a California judge invalidated the key changes, based on her interpretation of state court precedents.

The decision leaves California municipalities facing a bleak future. From 2006 through 2013, local governments that participate in the giant California Public Employees’ Retirement System saw their annual pension costs double, on average. Last year, the CalPERS board voted to require an additional contribution increase of 50 percent, phased in over five years. “While there is time to plan for the increase, the most fiscally stressed municipalities could find the increases unmanageable,” Moody’s wrote. Meanwhile, California governor Jerry Brown has signed off on another plan to rescue the state’s struggling teachers’ pension fund by requiring school districts to increase their annual contributions from $2 billion this year to $6 billion over the next seven years.

Pennsylvania school districts face a similar future. A recent report by the Pennsylvania Association of School Administrators estimates that retirement costs, which rose by 25 percent last year for most school districts, will equal 30 percent of salaries by 2020. (In 2009, by contrast, pensions added up to just 4 percent of pay.) In some municipalities, the burden is even greater. Philadelphia’s pension costs have tripled to $150 million since 2011, contributing to a budget squeeze that has led to hundreds of layoffs. But there’s no relief in sight. According to pension documents, the average age of a public school teacher in Pennsylvania is 44, while the typical teacher retirement age in the state is 60. That means that most of the state’s teacher workforce have years to continue working and earning benefits at the current expensive levels before they retire.

In some cities, reformers are challenging these inflexible state rules. San Jose mayor Chuck Reed is promoting a ballot initiative to amend the California constitution and allow municipalities to alter their pension plans. He’s sure to face stiff opposition from government unions, which are likely to spend at least $50 million to defeat the measure.

Legislators in Illinois have taken a different approach. Their state constitution bans changes to pensions, and costs have soared for both the state and its municipalities. Last year, legislators passed changes in defiance of constitutional protections, arguing in court that the state faces a “severe financial crisis” that makes reform “a valid exercise of the state’s reserved sovereign powers.” Unions are now challenging the reform law, and if they succeed, Illinois faces a $187 billion pension tab—equal to more than four times its revenues—with no plan to reduce the debt.

Illinois has lots of company. Without some way to amend the terms of retirement plans, states and municipalities groaning under the so-called California Rule face years of increasing costs and pressure on budgets that inevitably mean higher taxes and fewer services—in other words, the worst of both worlds.

Cross-posted at City Journal.