By Karen Pierog

CHICAGO (Reuters) - Chicago began an uphill battle in court on Wednesday to keep its cost-saving pension reform law from meeting the same fate as an Illinois law that was declared unconstitutional last week by the state supreme court.

The city is trying to salvage a 2014 law aimed at stopping two of its four retirement systems from running out of money. It is also dealing with the aftermath of Tuesday's credit rating downgrade to "junk" by Moody's Investors Service.

Cook County Circuit Court Judge Rita Novak set a July 9 hearing on motions by lawyers for city unions and retirees to toss out the 2014 law based on the high court's sweeping ruling that found the state constitution gives public sector workers iron-clad protection against their pension benefits from being cut.

Michael Freeborn, an attorney who filed one of the two lawsuits challenging the law, said a ruling by Novak could come soon after the July hearing, adding that Friday's supreme court ruling leaves "little if any wiggle room" to keep Chicago's law alive.

At a Wednesday status hearing on the lawsuits, Novak acknowledged that no matter how she rules, her decision will be appealed to the Illinois Supreme Court.

Chicago's top staff attorney, Stephen Patton, urged the judge to hear the case quickly, saying a prolonged process would be "extremely harmful to the city."

"We need certainty no later than the end of this year," Patton said.

Chicago contends its law, which boosted pension contributions by the city and its workers to the municipal and laborers' retirement funds and reduced benefits, differs from the now-voided 2013 law aimed at easing Illinois' $105 billion unfunded pension liability for state workers and educators. Illinois argued its so-called police powers to fund essential services allowed it to cut retirement benefits, but the supreme court disagreed.

"(Chicago's law) doesn't diminish and impair pensions, it saves pensions," Patton told the judge. "That argument has not been addressed."

Without additional funding and reforms, Chicago's municipal and laborers' retirement systems are projected to run out of money in 2026 and 2029. Meanwhile, the city must increase payments to its police and fire funds by $550 million next year.

Moody's downgrade triggered $2.2 billion in accelerated debt payments and fees related to Chicago's debt that banks could force the city to make.

Richard Prendergast, an attorney representing Chicago, said the city was engaged in "time-sensitive" negotiations with banks over those payments.

(Editing by Matthew Lewis)