By ED WHITEDETROIT (AP) a¿¿ A federal judge ruled Tuesday that Detroit can use bankruptcy to cut employee pensions and relieve itself of other crushing debts, handing a defeat to the city's unions and retirees and shifting the case into a delicate new phase. Judge Steven Rhodes, who wondered aloud why the bankruptcy had not happened years ago, said pensions can be altered just like any contract because the Michigan Constitution does not offer bulletproof protection for employee benefits. But he signaled a desire for a measured approach and warned city officials that they must be prepared to defend any deep reductions. "This once proud and prosperous city can't pay its debts. It's insolvent," Rhodes said in formally granting Detroit the largest public bankruptcy in U.S. history. "At the same time, it also has an opportunity for a fresh start." The ruling came more than four months after Detroit filed for Chapter 9 protection. Rhodes agreed with unions and pension funds that the city's emergency manager, Kevyn Orr, had not negotiated in good faith in the weeks ahead of the July filing, a key condition under federal law. But he said the number of creditors a¿¿ more than 100,000 a¿¿ and a wide array of competing interests probably made that "impossible." Detroit "could have and should have filed for bankruptcy long before it did. Perhaps years," the judge said. The decision set the stage for officials to confront $18 billion in debt with a plan that might pay creditors just pennies on the dollar and is sure to include touchy negotiations over the pensions of about 23,000 retirees and 9,000 workers. Orr says pension funds are short by $3.5 billion. Rhodes promised that he would not "lightly or casually" sign off on just any cuts. The city has argued that bankruptcy protection will allow it to help beleaguered residents who for years have tolerated slow police responses, darkened streetlights and erratic garbage pickup a¿¿ a concern mentioned by the judge during a nine-day trial that ended Nov. 8.