When a man cleared of murder after 21 years in prison sued Chicago police officers who put him away, the city brought on private lawyers and fought back. Three firms billed the city for more than 21,200 hours of work over six years, and at least 17 outside attorneys represented the city or cops in federal court.

Those lawyers were defending against allegations that disgraced detective Reynaldo Guevara and other officers manipulated a 12-year-old boy into identifying Jacques Rivera as the man who fatally shot a 16-year-old in in 1988. Like other men convicted with Guevara’s help, Rivera walked free after the witness recanted and Cook County prosecutors dropped the case. In the civil case, jurors awarded Rivera $17 million.

Over the last 15 years, fees and costs for private attorneys in civil rights cases totaled $213 million, the Chicago Tribune found by analyzing city data obtained through an open records request.

Last year alone, the city spent $30.1 million, more than twice what it spent on the agency that investigates police misconduct. The city has rung up especially large bills defending officers with long records of misconduct, including the late Commander Jon Burge, who is infamous for overseeing the widespread abuse of suspects during the 1970s and ’80s.

Unlike other cities, in many cases Chicago has paid a premium to private lawyers instead of using in-house attorneys who make much less money. In some cases, the city could have settled for less before spending heavily on attorneys, say the lawyers who sued. Among those cases was Rivera’s lawsuit. Told of the Tribune’s findings, new top city lawyer Mark Flessner called the spending on outside counsel “scandalous.” He vowed to try to rein in the expense by seeking to hire more in-house lawyers to handle cases.

Editor’s Note: The second round of the “Cash Register Justice” Reporters Fellowship program examining the use of fines and fees in courts around the U.S. opens Sept. 26-27. For more information, and additional stories on the issue, please click here.