FILE - In this May 23, 2012 file photo, American Federation of State County and Municipal Employees union members wear their protest message on their shirts outside the at the Illinois State Capitol Springfield, Ill. (Seth Perlman/AP)

THE ILLINOIS constitution forbids any reduction in promised pension benefits, even a tiny one, no matter how desperate the state’s financial situation may be. This is according to a May 8 ruling by the Illinois Supreme Court, which struck down a 2013 plan, enacted by a Democratic legislature and signed by then-Gov. Pat Quinn (D), that would have trimmed annual guaranteed increases, raised the retirement age for some employees and capped pensions for top earners, for an estimated savings of $160 billion over 30 years. This plan would not have restored Illinois’s pension plans to fully-funded status until 2044, but it was better than the status quo, under which they are less than 40 percent funded and more than $100 billion in arrears.

The state constitution’s strong pension protection language, on the books since 1970, makes pension commitments as sacred as contracts, the court held. Past legislatures and governors should have either stopped making lavish promises long ago or funded them fully, rather than neglecting annual contributions in favor of other items on their wish lists.

Now Illinois has the opposite problem: less and less money left over for key public services, such as higher education, after it has paid pensioners and other fixed costs such as interest on its bonds. Mr. Quinn’s successor, Gov. Bruce Rauner (R), has vowed to get control over the pension burden, even if it takes a constitutional amendment. He has some good ideas, such as introducing a 401(k)-like plan for new state hires. The odds, alas, are against him, given that it would take years to realize significant savings from reforms and that a constitutional amendment couldn’t go on the ballot for at least a year — assuming Democrats, who still dominate the state legislature, cooperate.

We don’t have any good advice for Mr. Rauner, but the lessons are clear enough: No state should ever get into such a financial trap in the first place. Elected officials should make only promises their states can afford to keep. To be sure, Illinois breaks all records for profligacy. But it’s unique only in the degree to which it has followed a recipe for disaster — promise retirees good benefits, then chronically skip annual contributions to the pension fund so as to avoid tax increases or spending cuts — to which other states also have adhered.

The situation in Maryland comes to mind. Though better funded than Illinois’s, Maryland’s state pensions are still well short of 80 percent funded, a widely accepted benchmark for the public sector. A 2011 law that was supposed to ensure a $300 million annual cash supplement for the plans has been repeatedly dishonored. The legislature was prepared to cut the infusion to $75 million until Gov. Larry Hogan (R) belatedly intervened to raise it to $150 million, but lawmakers rebuffed him. Illinois now faces a future of fiscal and political trench warfare. Maryland still has time to avoid that fate.