Updated

Stockton, Calif., became the most populous city in the nation to go broke Monday, after a judge accepted the city's application to enter bankruptcy.

In the closely watched decision, U.S. Bankruptcy Judge Christopher Klein said the bankruptcy declaration was needed to allow the city to continue to provide basic services. He determined Stockton would not be able to perform "its obligations to its citizens on fundamental public safety as well as other basic government services without" the protections provided under bankruptcy proceedings.

Stockton was facing a $26 million shortfall when it filed for bankruptcy last summer, the result of the housing bust and soaring pension obligations. After cutting a quarter of their police force and other city services to the bone, officials argued bankruptcy was their only option.

The city of nearly 300,000 people has become emblematic of government excess and the financial calamity that resulted when the housing bubble burst.

Its salaries, benefits and borrowing were based on anticipated long-term developer fees and increasing property tax revenue. But those were lost in a flurry of foreclosures beginning in the mid-2000s and a 70 percent decline in the city's tax base.

The city's creditors wanted to keep Stockton out of bankruptcy -- a status that would likely allow the city to avoid repaying its debts in full.

They argued the city had not cut spending enough or sought a tax increase that would have allowed it to avoid bankruptcy.

Matthew Walsh, an attorney for the bond holders, declined to comment after Monday's ruling.

Attorneys for the city said the city's budget and services had been cut to the bone.

"There's nothing to celebrate about bankruptcy," said Bob Deis, Stockton's city manager. "But it is a vindication of what we've been saying for nine months."

The Chapter 9 bankruptcy case is being closely watched nationally for potential precedent-setting implications.

The $900 million that Stockton owes to the California Public Employees' Retirement System to cover pension promises is its biggest debt. So far Stockton has kept up with pension payments while it has reneged on other debts, maintaining that it needs a strong pension plan to retain its pared-down workforce.

The creditors who challenged Stockton's bankruptcy petition are the bond insurers who guaranteed $165 million in loans the city secured in 2007 to pay its contributions to the CalPERS pension fund. That debt got out of hand as property tax values plummeted during the recession, and money to pay the pension obligation fell short.

Legal observers expect the creditors to aggressively challenge Stockton's repayment plan in the next phase of the process.

By 2009 Stockton had accumulated nearly $1 billion in debt on civic improvements, money owed to pay pension contributions, and the most generous health care benefit in the state -- coverage for life for all retirees plus a dependent, no matter how long they had worked for the city.

The Associated Press contributed to this report.