LANSING, Mich. – Michigan teachers unions were dealt a devastating legal blow this week when the state’s appeals court upheld a 2012 law that forces public school employees to contribute more to their pensions.

Michigan labor unions sued to block the law, but appeals judges ruled 3-0 to uphold a decision by a lower court that the pension changes enacted by state lawmakers are constitutionally sound, the Associated Press reports.

“Gov. Rick Snyder and the Republican-led Legislature enacted the law that officials said would cut more than $15 billion from a $45 billion liability in the Michigan Public School Employees Retirement System, which has more than 440,000 members from K-12 districts, universities, community colleges and libraries,” the news service reports.

MORE NEWS: Know These Before Moving From Cyprus To The UK

“School employees hired before 1990 – who were paying nothing toward retirement – must contribute 4 percent of their compensation to avoid seeing a reduction in their pension. Those hired from 1990 to June 2010 are paying 7 percent to keep their pension intact, up from before when they paid 3 percent to 6.4 percent, depending on their salary and hire date.”

The 2012 law also halted retirement health insurance for new hires and instead offers a 2 percent match in their 401(k) and a payout at retirement. The law only impacts employees hired before the middle of 2010. Those hired after that are on a different 401(k)-type plan, the AP reports.

“In upholding the law’s constitutionality, Judges Kirsten Frank Kelly and Henry William Saad it does nothing to diminish workers’ vested pension benefits because only future benefits are implicated. They also said it’s OK to have school employees contribute 3 percent of their salary for retiree health care because the contributions are voluntary, unlike a 2010 law. The workers can opt out of health benefits in retirement and avoid the salary deduction,” according to the news service.

Before the legislature acted on school employee pensions, retirement costs were eating up an increasingly significant percentage of local school budgets in Michigan. Lawmakers undoubtedly did the right thing by correcting the system’s unsustainable death spiral to ensure those who contributed to the system get the most out of the investment. They also set up a new, more affordable system for new employees, to prevent this type of financial catastrophe from happening again.

The end result is a much more financially secure retirement system.

Ironically, a secure retirement system is exactly what American Federation of Teachers-Michigan President David Hecker told the AP the union really wants when contacted after the recent appeals court decision.

MORE NEWS: How to prepare for face-to-face classes

“This just makes it even more clear how badly we need leaders who will promote a secure retirement for Michigan’s working families, not take it away from them,” he said.