DETROIT — A judge cleared Detroit to emerge from bankruptcy Friday, approving a hard-fought turnaround plan with a fervent plea to the people of this one-time industrial powerhouse to “move past your anger” and help fix the Motor City.

“What happened in Detroit must never happen again,” federal Judge Steven Rhodes said in bringing the case to a close a relatively speedy 16 months after Detroit – the cradle of the auto industry – became the biggest city in U.S. history to file for bankruptcy.

The plan calls for cutting retiree pensions by 4.5 percent, erasing $7 billion of debt and spending $1.7 billion to demolish thousands of blighted buildings, make the city safer and improve long-neglected basic services.

Rhodes praised decisions that settled the most contentious issues in the bankruptcy case, including a deal to prevent the sell-off of world-class art at the Detroit Institute of Arts and a consensus that prevented pension cuts from getting even worse for thousands of retirees. He said the pension deal “borders on the miraculous,” though he acknowledged the cuts could still cause severe misfortune for some.

Politicians and civic leaders, including Republican Gov. Rick Snyder, hailed Friday’s milestone as a fresh start for the city and the beginning of what could be a bright new era. It was Snyder who agreed with state-appointed emergency manager Kevyn Orr to take the city into Chapter 9.

Detroit was brought down by a combination of factors, including corruption and mismanagement at City Hall, a long decline in the auto industry and a flight to the suburbs that caused the population to plummet to 688,000 from 1.2 million in 1980. The exodus has turned entire neighborhoods into desolate, boarded-up landscapes.

With more square miles than Manhattan, Boston and San Francisco combined, Detroit didn’t have enough tax revenue to cover pensions, retiree health insurance and buckets of debt sold to keep the budget afloat.

“Detroit’s inability to provide adequate municipal services runs deep and has for years. It is inhumane and intolerable, and it must be fixed,” the judge said.

In signing off on the plan, Rhodes appealed to residents who expressed sorrow and disgust about the city’s woes.

“Move past your anger. Move past it and join in the work that is necessary to fix this city,” he said. “Help your city leaders do that. It is your city.”

The case concluded in lightning speed by bankruptcy standards. The success was largely due to a series of deals between Detroit and major creditors, especially retirees who agreed to accept smaller pension checks after the judge said they had no protection under the Michigan Constitution. Also, bond insurers with more than $1 billion in claims eventually dropped their push to sell off art and settled for much less.

Rhodes had to accept Detroit’s remedy or reject it in full, not pick pieces. His appointed expert, Martha “Marti” Kopacz of Boston, said it was “skinny” but “feasible,” and she linked any future success to the skills of the mayor and City Council and a badly needed overhaul of technology at City Hall.

The most unusual feature of the plan is an $816 million pot of money funded by the state, foundations, philanthropists and the Detroit Institute of Arts. The money will forestall even deeper pension cuts and also avert the sale of city-owned art at the museum.