The city of Detroit filed for Chapter 9 bankruptcy protection in federal court Thursday, laying the groundwork for a historic effort to bail out a city that is sinking under billions of dollars in debt and decades of mismanagement, population flight and loss of tax revenue.

The bankruptcy filing makes Detroit the largest city in U.S. history to do so. The filing begins a 30- to 90-day period that will determine whether the city is eligible for Chapter 9 protection and define how many claimants might compete for the limited settlement resources that Detroit has to offer.

The bankruptcy petition would seek protection from creditors and unions who are renegotiating $18.5 billion in debt and other liabilities