CHICAGO — Gov. Pat Quinn has signed landmark legislation Thursday to reform Illinois’ massively-underfunded pension system, though the new law is certain to face threatened lawsuits by labor unions.

The overhaul, approved by the General Assembly this week after years of delay and inaction, cuts benefits for most employees and retirees. It has a June 1 effective date, but could be delayed by the legal challenges.

Quinn, who often signs new laws in celebratory public events, signed the pension bill Thursday afternoon in a private ceremony. It was a mark of how politically sensitive the issue is in Democrat-controlled Illinois, with hundreds of thousands of public employees and retirees across Illinois being negatively affected.

“Illinois is moving forward,” Quinn said in a statement released after the bill was signed. “This is a serious solution to address the most dire fiscal challenge of our time.”

Illinois’ $100 billion shortfall in funding employee retirement benefits is considered the worst pension crisis in the nation. For decades, while other states dealt with similar problems, Illinois lawmakers and governors skipped or shorted payments to their state’s five pension systems. It led to repeated downgrades of the state’s credit rating and diverts millions of dollars from education and social programs.

The new plan is expected to save the state roughly $160 billion over three decades and guarantees Illinois will make its full annual contribution to the pension funds. Legislative leaders have estimated the plan will reduce the current unfunded liability by about $21 billion and fully fund the retirement systems by 2044.

Unions representing public employees say the legislation, unveiled last week and approved Tuesday by the General Assembly, violates the Illinois Constitution. They cite a provision that prohibits diminishing pension benefits.

However, Quinn and legislative leaders believe the new proposal will survive a court challenge because of the funding guarantee and a reduction in employees’ own contributions to their retirement funds.

“Something’s got to be done,” House Speaker Michael Madigan told representatives on the day of the vote. “We can’t go on dedicating so much of our resources to this one sector of pensions.”

Pension reform has been a top priority for Quinn, but previous attempts to achieve it went nowhere. That included special legislative sessions in Springfield, a social media campaign and even a failed attempt to withhold lawmakers’ salaries until they acted.

Under the new law, automatic, annually-compounded 3 percent cost-of-living increases for retirees — considered to be the biggest driver of pension costs — would be replaced with smaller annual adjustments for the highest earners. Some workers would have the option of freezing their pension and starting a 401(k)-style defined contribution plan. Also, the retirement age will be pushed back for those 45 and younger.

Pension reform already has become a major issue in Quinn’s bid for re-election in 2014, with the governor claiming it as a victory but three of four Republican challengers opposed to the law.

The three are State Sen. Kirk Dillard, Illinois Treasurer Dan Rutherford and venture capitalist Bruce Rauner.