But Judge Klein found that the group, which he called “the capital markets creditors,” had raised the fairness issue prematurely. He also said he found their claims that the city was feigning insolvency unpersuasive. Municipalities must clear several legal hurdles before they can qualify for bankruptcy court protection, and Judge Klein said Stockton had done more than necessary to demonstrate its eligibility.

For example, he said the city had already made big cuts in its work force and had wrung painful concessions out of the workers who remained. He cited rising drug trafficking and gang violence and said the police force and fire department had been reduced so much that any further cuts would put residents at an unacceptable risk. Even after all those cuts, he said Stockton had reached a point where the only way it could keep from running out of cash was by defaulting on its bonds.

The judge also said that California statute required all Chapter 9 candidates to go through a 60-day mediation period before declaring bankruptcy, and creditors were supposed to help pay the cost. But the capital markets creditors dropped out of mediation, he said, when they learned Stockton was not seeking any concessions from Calpers. That left the city to pay the whole bill.

“The capital markets creditors contend that the city gave them a take-it-or-leave-it proposition, and that that is not negotiation,” Judge Klein said. “I’m sorry. I’m not persuaded. Negotiation is a two-way street. You can’t negotiate with a stone wall. You cannot do it. It cannot be done. It is a contradiction in terms.”

Stockton’s city manager, Bob Deis, expressed satisfaction with Judge Klein’s decision in a written statement. “After nine months and millions of dollars in legal fees, the judge validated what we have been saying from the beginning, that the city is insolvent and needs the protection of bankruptcy to adjust its debts.”

Calpers’ chief executive, Anne Stausboll, issued a statement saying that Stockton “has consistently acknowledged the importance of providing benefits to its employees through its existing relationship with Calpers, consistent with state law.” She said that Calpers would continue to act as a fiduciary as the bankruptcy progressed, “and protect and defend the integrity and soundness of the pension plan.”