Detroit became the largest U.S. city to file for bankruptcy on Thursday.

After years of economic turmoil, the city's emergency manager, Kevyn Orr, asked a federal judge for Chapter 9 bankruptcy protection, the Associated Press reports.

The filing needs to be approved by Michigan's governor and the courts, but would offer Detroit protection from the groups negotiating about $18.5 million in debts from the city, the Detroit Free Press reports.

According to the AP report, Detroit's current budget deficit is estimated at more than $380 million, with at least $14 billion in long-term debt.

As Detroit's economy has gone down, so has its population. The city lost more than 237,000 residents between the 2000 and 2010 censuses, which is about a 25 percent population decline.

Chapter 9 bankruptcy is rare, so the Detroit Free Press wrote a guide explaining what it could mean for the city. The Atlantic has a link to the documents of the filing.