The city of Detroit field for Chapter 9 bankruptcy protection in federal court Thursday after decades of decline, beginning a lengthy legal battle.

The petition for bankruptcy was filed in the Eastern District of Michigan by emergency manager Kevyn Orr, a former bankruptcy lawyer appointed in March by Michigan Gov. Rick Snyder to resolve the city’s fiscal struggles.

“This was a difficult and painful decision,” Snyder said of authorizing Orr to file for bankruptcy, “but I believe there were no other viable options.” In a video released by his office, Snyder said that “this is a situation that has been 60 years in the making, in terms of the decline of Detroit.”

In his authorization letter to the bankruptcy court, Snyder wrote: “I know many will see this as a low point in the city’s history. If so, I think it will also be the foundation of the city’s future — a statement I cannot make in confidence absent giving the city a chance for a fresh start, without burdens of debt it cannot fully hope to pay.” Snyder's note said that the city is currently unable to meet “basic obligations” to both citizens and creditors.

According to the bankruptcy filing, Detroit now has more than $18 billion in unfunded liabilities. The city’s population has dwindled from 1.85 million in 1950 to under 700,000 today, and its tax revenues have shrunk accordingly even as the average tax burden has risen to the highest level of any town in the state. A deficit estimated at $237 million in June was too much for the once-mighty industrial town to handle.

Orr’s goals, laid out in a report issued in June, were simply to keep the lights on and the fire department operating. Currently, according to the report, 40 percent of the Detroit’s streetlights don’t work, and there are 78,000 abandoned and blighted houses in the city, posing a massive fire risk. A recent New York Times feature corroborated Orr’s account of life in Detroit, reporting that most city residents no longer rely on even basic services like police or the fire department.

Orr previously used the city’s dire financial circumstances as leverage in negotiations with the city’s creditors and public worker unions. He made national headlines for scaring residents by contemplating the fire-sale value of some of the city’s crown jewels — including the art collection in the Detroit Institute of Arts.

Orr also already took the drastic step of announcing, in June, that the city would default on some of its unsecured debt, and proposed to offer bondholders 10 cents on the dollar for their debts. He also announced that he would skip payments on some of general obligation debt — debts backed by the city’s taxing power. The bond rating agency Moody’s Investors Service called the default “unconventional and precedent-setting,” and noted that it “would be a break from tradition” to treat general obligation debt the same as unsecured debt.

Those claims will now be resolved in bankruptcy proceedings. First, the federal court must determine whether the city meets the standard for Chapter 9 bankruptcy. Qualifying for bankruptcy for cities is more difficult than for corporations, because cities must demonstrate fiscal insolvency. If bankruptcy is approved, the federal court will adjudicate the creditors’ and city workers’ claims.

Detroit is the largest U.S. city to file for bankruptcy. Previously, the largest municipal bankruptcy had been that of Stockton, Calif., which filed for Chapter 9 protection in June 2012.

Tracy Gordon, a public finance expert with the Brookings Institution, cautioned that few other indebted U.S. cities face the same situation that Detroit does, because Detroit’s fiscal struggles were decades in the making and related to broader social and political trends.

Nevertheless, Gordon said, investors will take note of Detroit’s treatment of bondholders, and especial general obligation bondholders, in the lead-up to the bankruptcy declaration.