Municipal workers and retirees said they were shaken by the developments, and unsure what to expect. Any cut to pensions, many said, would be crushing.

“The impact of this is going to be catastrophic on families like mine on fixed income,” said Brendan Milewski, 34, a Detroit firefighter who was seriously injured in an arson in 2010 and said he received a pension of $2,800 a month from the city. “Retirees are going to be put out of house and home. They’re not going to be able to afford a car, food or medicine.”

Bruce Babiarz, a spokesman for the Detroit Police and Fire Retirement System, was blunt in his assessment. “This is one of the strongest protected pension obligations in the country here in Michigan,” he said. “If this ruling is upheld, this is the canary in a coal mine for protected pension benefits across the country. They’re gone.”

Since July, Mr. Orr, with approval from Gov. Rick Snyder, a Republican, has sought bankruptcy protection, and most here agree that the city’s situation is dire: Annual operating deficits since 2008, a pattern of new borrowing to pay for old borrowing, miserably diminished city services, and the earmarking of about 38 percent of tax revenues for debt service. A city that was once the nation’s fourth largest has dropped to 18th, losing more than half of its population since 1950. The city was once home to 1.8 million people but now has closer to 700,000.

Judge Rhodes rejected arguments by unions and other opponents that the bankruptcy filing was the result of secret and unconstitutional decisions made by Mr. Snyder and others. He agreed with opponents of the bankruptcy that the city had failed to make “good faith” attempts to negotiate with creditors, but said that such negotiations had been “impracticable.”