SACRAMENTO, Calif. (AP) – A judge on Thursday approved a plan by Stockton, California, one of the largest U.S. cities to declare bankruptcy, allowing it to eliminate more than $2 billion in long-term debt payments without touching its massive pension obligations.

Marking a critical development in the city’s financial recovery, U.S. Bankruptcy Judge Christopher Klein said Stockton can use the plan to exit the court’s Chapter 9 protection, which it sought in 2012. Klein’s ruling can be appealed.

READ MORE: One Child Rescued, 3 Adults Missing In Sacramento River Near Rio Vista

“This plan, I’m persuaded, is the best that can be done in terms of restructuring an adjustment of the debts of the city of Stockton,” he said.

The city successfully negotiated deals with all major creditors except Franklin Templeton Investments, which argued it was being treated unfairly. The investment firm said the city didn’t cut employee pensions while asking the company to walk away from collecting nearly $32.5 million it is still owed.

“Obviously we are disappointed,” Franklin Templeton’s attorney, James Johnston, told the judge. “We will evaluate our next steps.”

Johnston was not available after the hearing for comment, and the firm’s spokeswoman, Stacey Coleman declined in an email to elaborate.

Klein ruled earlier this month that bankruptcy law allows the city to treat pension obligations like any other debt, meaning the city could choose to trim benefits. City officials said they have already reduced employee pay and benefits, and cutting pensions would cause an exodus of workers.

Klein agreed with the city, saying Stockton’s plan did not violate bankruptcy law or treat Franklin Templeton unfairly. He noted that the city also created a lower pension plan for new employees.

“There already have been very substantial concessions,” Klein said.

An inland port city 80 miles east of San Francisco, Stockton filed for Chapter 9 protection in 2012, making it the nation’s largest bankrupt city before Detroit filed for bankruptcy last year.

Elsewhere in California, Vallejo went through bankruptcy before Stockton. San Bernardino filed shortly after Stockton and has yet to present an exit plan.

Stockton attorney Marc Levinson said the case had no direct implications on other cities.

READ MORE: What's Open And What's Closed This Fourth Of July

“If a city in the future wants to impair pensions, they can take a crack at it,” he said. “My client, Stockton, did not want to.”

Stockton City Manager Kurt Wilson said a lesson for other cities is to watch for the early signs of deep financial troubles and head them off before it’s too late. He said Stockton can now focus on providing services to residents, rather than waging the bankruptcy fight.

“This has been a very draining and ugly process,” Wilson said, adding that the city restructured its debts to bond market investors through the year 2054.

The bankruptcy cost Stockton more than $13 million for attorneys and consultants.

Stockton’s leaders say the city was victimized by an unforgiving boom-and-bust economic cycle.

Before the recession, leaders spent millions of dollars revitalizing the downtown area with a new City Hall and building a marina, sports arena and ballpark. The city issued about 3,000 permits annually to build new homes, and it paid police premium wages and health benefits.

With the recession, building dried up, and Stockton became ground zero for home foreclosures. Like many residents, City Hall couldn’t pay its bills. The city slashed millions of dollars from its budget and laid off 25 percent of its police officers. Crime soared.

Stockton Mayor Anthony Silva said he was pleased by the ruling but it was no occasion for city officials to pat themselves on the back. The bankruptcy came at a great cost to retired city employees, who lost their health care benefits, current city workers and residents who had to live with a low level of services.

“I advise other cities to keep a close eye on your finances,” Silva said. “I wouldn’t wish bankruptcy on anybody else.”


MORE NEWS: Firefighters Rescue Kitten Trapped In Tennessee Walmart Pepsi Machine

Copyright 2014 The Associated Press.