A judge has approved the California city of Stockton's bankruptcy filing, making it the most populous US city ever to enter bankruptcy protection.
A federal judge said without bankruptcy protection, Stockton would be unable to provide basic government services.
The city of 290,000, 90 miles (144km) east of San Francisco, saw its tax base plummet in the US housing market crash.
The ruling grants Stockton protection from creditors - who opposed the filing - while it negotiates debt repayment.
Stockton's creditors - bond insurers who had financed the city's debt - argued the city had not cut spending enough nor sought a tax increase to avoid bankruptcy.
But lawyers for the city said it had slashed its budget to the bone after a 70% decline in the city's tax base.
The California city first filed for bankruptcy in June 2012 after failing to come to an agreement with its creditors. The judge came to his decision on Monday after a three-day trial.