Detroit’s Big Three got there first.

They were brought to their knees by management that was either unwilling or unable to make painful decisions. Now almost every state, municipality and school system in the U.S. is about to go through the same kind of crisis.

General Motors, Ford and Chrysler got in trouble because they were incapable of keeping a lid on their pension costs. They lacked the discipline to keep their debt loads at manageable levels. And they agreed to labor costs that simply were not competitive. When the Great Recession hit two years ago, the house of cards collapsed.

Now, state and municipal governments face the exact same set of problems. All they have to do is look at what happened to U.S. auto makers to get an idea of what they’re about to go through. By the same token, they can leaf through the Detroit Three’s playbook to learn what they’ve got to do.

Not all the lessons will apply. Detroit’s auto industry was saved by the Obama administration. It poured some $75 billion into GM, Chrysler and the supplier community. But don’t look to Washington to bail out the states. Not in today’s anti-tax, anti-spend political climate.

U.S. auto makers are on the road to financial recovery because they finally made very tough decisions. They got rid of several hundred thousand workers. They dropped traditional pensions, replacing them with savings plans. Health care was pared back and workers now have much higher co-pays. They closed down unnecessary plants, sold off money-losing operations and outsourced non-core operations.

Importantly, the Detroit Three’s unions were forced to accept significant concessions. This included work rule changes that have greatly improved productivity and quality. It also included significant wage reductions for new hires.

The good news is this bitter medicine is working wonders. Even though Ford did not go through bankruptcy, it made many of the same changes as GM and Chrysler. Ford now is spectacularly profitable even though sales in its home market remain at abysmally low levels. GM is solidly profitable, and even Chrysler is reporting an operating profit.

By getting rid of their legacy costs, Detroit auto makers now are free to invest and grow again. For the first time in my 32-year career they are fully competitive with any auto maker anywhere in the world.

The states, municipalities and school systems could also revive and thrive if they take the proper steps. But I don’t hear anyone talking about what needs to be done. Instead, these public institutions are acting and talking just like GM, Ford and Chrysler before the big collapse.

They just keep pushing the tough decisions into next year’s budget, hoping and praying that somehow the economy will improve or someone will swoop in to save the day.

I can’t bear to watch. It’s like averting your eyes from a horrific accident taking place in front of you. This is going to be gruesome.

You’ve heard the old saying that “those who ignore the lessons of history are condemned to repeat it.” Well, the Detroit Three just gave us one heck of a history lesson. We need to learn from it.

John McElroy is editorial director of Blue Sky Productions and producer of “Autoline” for WTVS-Channel 56 Detroit, and “Autoline Daily,” the online video newscast.