In November 2014, a Michigan bankruptcy judge confirmed a plan that allowed Detroit’s government to shed $7 billion in liabilities, averting a total financial collapse. One year later, however, many in Detroit are still dealing with the fallout of the massive debt reorganization.

Among the many shortchanged by the city’s bankruptcy, Detroit’s retired municipal workers have gotten a particularly raw deal. The plan imposed deep cuts in future pension and health-care benefits. Perhaps more galling, it also required retirees to pay back a decade of interest they earned on city-sponsored retirement savings accounts. These so-called clawbacks averaged nearly $50,000 per retiree. In one circumstance, a retiree returned $96,000.

These losses for retirees seem unusual, but many more like them could follow. The same accounting strategy that led Detroit to make unfulfilled promises is widely used by state and city legislators throughout the country. By using an accounting method known as cash-basis accounting, legislators project future spending without having to consider billions of dollars of long-term financial commitments, leaving many budgets balanced in name only.

It may be easiest to think in terms of personal finance. Imagine you purchase a car for $20,000 in 2015, but under a special promotion no payments are due on your bill until 2018. In what year did you incur the $20,000 bill? Most people would say 2015, the year you acquired the car. That’s the answer mandated under accrual accounting, a method of financial reporting required of all public companies by the Financial Accounting Standards Board. But many state and city legislatures disagree. They operate with the conviction that a bill is not incurred until the money leaves your bank account to pay it. So if you choose not to pay the bill for your car until 2018, for accounting purposes the bill will only appear that year.

Cash-basis accounting is a recipe for fiscal disaster. State and local governments make long-term commitments for programs like employment compensation plans and public works projects. But they write their budgets on a year-to-year basis, as if starting all over again each year with fresh revenue and expenses. They leave out any revenue not received or, more importantly, any expense not incurred that year. The implications of this financial-planning decision can be immense. In 2010, Virginia reported that it had a cash-basis surplus of nearly $50 million in a budget of $34 billion. When converted to accrual accounting, the surplus turned into a $674.3 million deficit.

Government pension funds are a prime example of the kinds of expenses that state and local governments hide. When legislators announce an increase in upcoming pensions for government employees, the government amasses large new financial liabilities and makes a legally binding obligation for expenses incurred. But under cash-basis accounting, the new pension liabilities won’t show up in the budget until the government starts to pay out decades later. This is what happened in Detroit, which declared bankruptcy two years ago in large part because enormous pension and health-care payments were due and the city couldn’t pay for them.

Fearing precisely this sort of fiscal calamity, the Financial Accounting Standards Board outlawed cash-basis accounting decades ago in much of the private sector. This policy ensured that companies would understand their fiscal health before making any significant decisions involving costly long-term commitments.

The International Federation of Accountants and the Big Four accounting firms have been calling on governments to change their practices for years.  They say that accrual accounting gives the public better information about its governments’ finances and, as a result, helps avoid a fate like Detroit’s. New York City, for example, made the switch in 1975 as part of its effort to avoid bankruptcy. Around the world, many governments—including some in Africa, Asia, and Latin America— are planning to shift to accrual accounting in the near future.

The shift to accrual accounting isn’t painless for new adopters. Once forced to reckon with long-term liabilities, state and city governments will likely find they have amassed much bigger deficits than they realized. Legislators may then need to cut spending and entitlements in an effort to balance their budgets.

Accrual accounting is also a far more complex method. Small municipal governments might not have enough manpower to adopt an accounting method that—beyond recording revenues received and expenses incurred as those events happen—requires projections about the budget extending in the coming years.

But states and large cities like Detroit cannot afford to ignore accrual accounting.

With budgets worth billions of dollars, their legislatures should have the expertise to handle its rigors. And by making tough budget decisions now, these governments might avoid making tougher decisions down the road.