DETROIT (MarketWatch) — The city of Detroit filed for federal bankruptcy protection on Thursday afternoon, making the automobile capital and one-time music powerhouse the country’s largest-ever municipal bankruptcy case.

The case filed in U.S. District Court for the Eastern District of Michigan came after Kevyn Orr, the emergency manager, failed to reach agreements with enough of the bondholders, pension funds and other creditors to restructure Detroit’s debt outside of court. The final decision rested with Republican Gov. Rick Snyder, who had appointed Orr as Detroit’s overseer in March.