California state attorneys are digging in to fight court rulings directing the state to pay about $40 million in back wages and benefits to some 3,000 current and former judges who contend they were shortchanged during the recession.

Winning the case could save taxpayers tens of millions of dollars. But continuing to fight it carries an expensive risk, too. The state must pay 10 percent annual interest on the back wages and benefits, meaning the bill is climbing by $4 million a year as the case drags on at the 2nd District Court of Appeal four years after retired appeals court Justice Robert Mallano filed the lawsuit.

The case centers on Mallano’s complaint that the state failed to give mandatory raises to judges during the recession between 2008 and 2013. By law, judges receive raises based on average wage increases that go to other state employees. If the average wage increase for all state workers is 3 percent, judges also would get a 3 percent raise.

In that period, most state workers saw their wages decrease because of furloughs, but some state workers did not have furloughs and benefited from raises during the recession. Mallano argued in his lawsuit that judges should have had timely raises in line with those wage increases.

In 2013, the state boosted judges’ wages with a formula that seemed to acknowledge that judges were entitled to recession-era raises. It gave them a 1.4 percent raise, which was the cumulative wage increase they would have received between 2008 and 2013 had the state followed the law governing judicial pay.

The state’s appeal contends that the court decisions favoring Mallano’s case don’t expressly award back wages, but the April 2017 appeals court ruling actually spells out how much money judges would receive in wages and interest. At the time, the appeals court wrote, active judges would receive between $14,600 and $18,700. The calculations would also affect pensions for retired judges. It described the money as salaries that were “wrongfully withheld.”

Last July, a Los Angeles County Superior Court judge stressed the state’s risk at continuing the fight. By then, the state had lost the case in Los Angeles in 2016 and again in April 2017 at an appeals court. The state did not appeal the ruling to the state Supreme Court. State attorneys have refused to offer an alternate calculation for the back pay, contending instead that the state does not owe back wages.

“Do you recognize that there’s 10 percent interest as the judgment that’s been affirmed on appeal?” Los Angeles Superior Court Judge Elihu Berle said to a deputy attorney general at the hearing, according to a court transcript. “So you’re willing to risk 10 percent interest? If the judgment is $40 million, that’s $4 million per year at 10 percent interest that the state may become liable. You’re willing to expose the state and taxpayers to that interest?”

At the end of his remarks, Berle said, “I wonder what message the attorney general wishes to send to defendants in which the state sues about complying with judgments.”

The state has taken steps to comply with other parts of the rulings. Last year, for instance, it recalculated pay for active judges based on the formula courts directed. It’s also complying with an order that it pay about $700,000 in legal fees.

It’s refusing to pay the back wages, however, arguing that Mallano’s team did not properly file a claim for retroactive compensation at the start of the lawsuit, and that any damages the judges might be entitled to receive are voided by a statute of limitations.

“If they want to seek back pay, they should be filing the proper action for back pay,” John Rich, the deputy attorney general leading the state’s defense, said at the July hearing. He followed up with a formal appeal, again at the state’s 2nd District Court of Appeal, last month.

Mallano lawyers William Casey and Raoul Kennedy filed a rebuttal this week, asking the appeals court to uphold the previous decisions in plain language that will “preclude yet a third appeal and further delay the payment of wages that should have been paid as much as a decade ago.”