A judge has ruled that Detroit is eligible to file for bankruptcy, making it the largest municipal filing in US history, according to the Detroit Free Press.

"The city's debt and cash flow insolvency is causing the city's 700,000 residents to suffer hardship," US bankruptcy judge Steven Rhodes said in court today. "This situation has proved unworkable."

Detroit is in debt on the order of $18 billion, causing city services to suffer and many neighborhoods to turn to blight. The bankruptcy clears the way for nullifying billions of dollars of the city's obligations to its creditors.

Detroit had to prove in court that it is insolvent and tried to resolve its debts "in good faith." There was some challenge to that in court and some creditors have said they plan to appeal, but most expected the judge would allow Detroit to go forward with the bankruptcy.

Detroit had to show the court that it can't pay its debts

Next, the city will submit a plan for restructuring. Such plans usually entail painful cuts to public services, but Detroit has been unable to provide for its citizens for years. Ambulances take hours to come and traffic lights are being turned off. The bankruptcy, and the federal aid that has already been promised, may help the city pull itself out of economic depression.

Still, the restructuring may hit pension plans and other places where citizens will feel the blow.

"There's going to be a lot of pain for a lot of different people," Detroit Mayor Dave Bing said in a press conference after the ruling. "But in the long run, the future will be bright."