By Karen Pierog and Hilary Russ

SPRINGFIELD, Ill. (Reuters) - A state lawyer defending the landmark 2013 pension reform law faced tough questions on Wednesday from an Illinois Supreme Court judge at a high-stakes hearing about whether the legislature had the right to cut benefits.

“Aren’t we giving the state the power to modify its contractual obligations whenever it wants?” Justice Robert R. Thomas asked State Solicitor General Carolyn Shapiro. “For instance, the state could simply fail to fund the pension systems and them claim an emergency, correct?”

Shapiro disagreed, saying: “Invoking the police powers is not something that the state can do willy-nilly.”

The state contends the legislature was entitled to invoke police powers to solve a fiscal emergency. The state says shaky finances are making it hard to fund basic services, which is why it was necessary to raise the retirement age and suspend retiree cost-of-living increases.

Lawyers representing unions and other plaintiffs suing to overturn the law said the legislature had no such right.

“It is clear that the pension clause and the pensions are not subject to the police powers,” said attorney Aaron Maduff with Maduff & Maduff in Chicago.

In November, a county court tossed the law. At Wednesday's hearing, the high court met to hear the state's appeal.

The stakes are high for Illinois, which has the worst-funded pension system and the lowest credit ratings of all 50 states and says pension costs were making it impossible to fund services such as healthcare and public safety. Most of the justices asked no questions, making it hard to predict an outcome.

In her opening statement, Shapiro told the court that overturning the pension reform law "would tie the state's hands when its need to act is most pressing."

The court chamber was packed with politicians, union leaders and other observers. After the hearing, State Senator Kwame Raoul, a leader of the pension reform effort, compared a prior high court case that protected retiree health care benefits with "tea leaves" that may determine how the court will rule on pension reform.

The Democratic lawmaker said the state worsened its pension problem by not making adequate contributions.

A ruling is expected this spring. Ty Fahner, a former Illinois Attorney General and a partner at law firm Mayer Brown in Chicago, said it was unclear what the court would decide.

"There are seven justices and only two of them asked questions,” he said.

Michael Freeborn, a union lawyer, said he did not think the justices would accept the state’s argument.

“The state’s argument that there is a fiscal emergency rings a little hollow,” Freeborn said. He said state had demonstrated poor fiscal management, citing a decision to allow temporary higher income tax rates to partially roll back on Jan. 1.

The case also has ramifications for Chicago, which is defending a 2014 state law that reset city pensions.

In a separate case last July, the state supreme court ruled 6-1 that healthcare benefits to retirees were protected by the constitutional prohibition against pension cuts.

Besides Maduff, attorney Gino DiVito of Tabet DiVito & Rothstein in Chicago also represented the unions and other parties that sued to void the law.

(Reporting by Karen Pierog, Hilary Russ and Megan Davies. Editing by Phil Berlowitz, Andre Grenon and David Gregorio)