Thousands of Chicago motorists may be able to get their cars and trucks out of city impound lots immediately after filing for Chapter 13 bankruptcy following a federal appeals court ruling that the city could no longer hold onto the vehicles.

The 7th U.S. Circuit Court of Appeals said the city’s aggressive strategy, aimed at discouraging motorists whose vehicles had been impounded over unpaid tickets from filing under Chapter 13, violated the basic protections of bankruptcy, and the city was doing so mostly to generate revenue.

“This allows Chapter 13 to accomplish its intended purpose, which is to put the property that a debtor needs to go on with the debtor’s life in the hands of the debtor,” said Eugene Wedoff, a retired chief bankruptcy judge for the Northern District of Illinois who argued the appeal on behalf of the debtors.

The opinion, which upholds orders issued by judges in four cases in the U.S. Bankruptcy Court in Chicago, draws on reporting by ProPublica Illinois last year that showed how debt from unpaid parking and automated traffic camera tickets has led thousands of mostly black and low-income drivers to file for Chapter 13 bankruptcy.

Dive Deeper Into Our Reporting Our newsletter is written by a ProPublica Illinois reporter every week.

This kind of bankruptcy allows for ticket debt forgiveness and what’s known as an “automatic stay,” a protection that gives debtors the opportunity to regain their financial footing and repay their creditors. For years, what that meant for indebted motorists in Chicago was the ability to quickly reinstate drivers’ licenses suspended over unpaid tickets and retrieve impounded vehicles without having to first pay fines or fees.

Chapter 13 bankruptcy is also cheaper, at the onset, than enrolling in a city ticket payment plan. Many law firms will file cases without a retainer, spreading legal fees over the life of the bankruptcy. A city payment plan can require a down payment of up to $1,000.

Filing for bankruptcy is rarely a long-term solution, however; impoverished debtors frequently fail to make required monthly payments, leaving their bankruptcies to collapse without debt relief, ProPublica has reported. When that happens with cases involving ticket debt, the city recovers little if any money.

Hoping to stem the flood of bankruptcies and bring in more revenue, city officials in 2017 began claiming that the city had liens on impounded vehicles and that it didn’t have to return them immediately after motorists filed for bankruptcy. Instead, the city held onto the cars until motorists agreed to prioritize paying off ticket debt in their bankruptcy payment plan, a process that often took months and left many people unable to get to work. This assured the city it would get paid back more of what it was owed; typically, debtors pay just pennies on the dollar for unpaid tickets in bankruptcy payment plans, which can last up to five years.

Officials would not say how many vehicles the city refused to return after launching its lien policy. But in 2016, the city returned close to 3,800 impounded vehicles to debtors who had filed for bankruptcy.

The federal appeals court said the city’s claim that it had liens on the impounded vehicles was valid, but that it still needed to return the vehicles to their owners immediately after they filed for bankruptcy.

“At bottom, the City wants to maintain possession of the vehicles not because it wants the vehicles but to put pressure on the debtors to pay their tickets,” a three-judge panel wrote in its opinion last month. “That is precisely what the [automatic] stay is intended to prevent.”

A spokesman for the city’s Law Department declined to comment on the ruling.

The court’s ruling means the city must go to court on a case-by-case basis if, for example, it believes the bankruptcy was filed in bad faith or wants assurances it will get paid more of what it’s owed.

“The City’s argument that it will be overburdened with responding to Chapter 13 petitions is ultimately unavailing; any burden is a consequence of the Bankruptcy Code’s focus on protecting debtors and on preserving property of the estate for the benefit of all creditors,” the judges wrote. “It perhaps also reflects the importance of vehicles to residents’ everyday lives, particularly where residents need their vehicles to commute to work and earn an income in order to eventually pay off their fines and other debts.”

The court also rejected the city’s argument that it needed to hold onto impounded vehicles to keep bad drivers off the road. The judges wrote that the kind of violations that typically lead to impoundments are “for parking tickets, failure to display a City tax sticker, and minor moving violations. Even tickets for a suspended license, a seemingly more serious offense, are often the result of unpaid parking tickets and are thus not related to public safety.”

ProPublica Illinois has reported on how violations for not having vehicle city sticker — which can grow to $488 with late penalties and collections fees — are the biggest source of ticket debt in Chicago.

It’s unclear whether Mayor Lori Lightfoot’s administration will ask the U.S. Supreme Court to take the case and fight to continue a legal strategy crafted during Rahm Emanuel’s tenure as mayor. Lightfoot’s office did not respond to requests for comment. During her mayoral campaign, Lightfoot said she would look for more progressive revenue alternatives to tickets, saying “our regressive, extractive ticketing system has forced thousands of motorists of color into bankruptcy, which imposes its own costs on our city budget.”

Even before Lightfoot’s election, city officials were looking for other ways to steer motorists away from Chapter 13, the only kind of bankruptcy in which ticket debt can be wiped out. In November, the city approved a proposal from the Law Department to forgive old ticket debt for motorists who file for bankruptcy under Chapter 7, which almost always end with debt relief.

The city’s “Fresh Start” program wipes away unpaid tickets, fines and fees issued more than three years before debtors file for a Chapter 7 bankruptcy, as long as they complete a city payment plan for more recent ticket debt. Late penalties and collection fees are also forgiven.

The Law Department said 605 people have signed up for the program since it went into effect in January. If they successfully complete the program, the city could waive almost $4 million in ticket debt, or about $6,500 per person.